Manual NINOX

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 122

User

Manual
Ninox User
Manual

Table of Contents
1. FAQ
1.1. FAQ
2. Tutorial
2.1. Tutorial
2.2. Part I
2.3. Part II
2.4. Part III
3. Introduction
3.1. Basics
3.2. First steps
4. User Interface
4.1. Start Page
4.2. Database Homepage
4.3. Calendar
4.4. Search
5. Tables
5.1. Create and Modify Tables
5.2. Data Field Types
5.3. Table References and Relations
5.4. Forms
5.5. Views
5.6. Views: Filtering Values
5.7. Charts
5.8. Update multiple values
6. Calculations
6.1. Formulas
6.2. Triggers
6.3. Mathematical functions
6.4. Logical functions
6.5. Text / Date Functions
6.6. Reference of Functions and Language
7. Import and Export
7.1. Import Data
7.2. Importing Linked Data
7.3. Import Data from Bento
7.4. Export Data
7.5. Import attachments
8. Print
8.1. Print
8.2. Print tables
8.3. Print formular
8.4. Add Elements
8.5. Use Ninox Language to add fields
9. System-Requirements
9.1. System-Requirements
10. User management, identities and rights
10.1. User management, identities and rights
11. Data synchronization
11.1. Data synchronization
11.2. iCloud
12. Data backup
12.1. Data backup
13. API
13.1. Get started
13.2. Ninox REST API
13.3. Ninox HTTP Calls
13.4. Zapier
14. Ninox Private Cloud on Premise
14.1. Ninox Private Cloud on Premise - Installation

2
Ninox User
Manual

1. FAQ
1.1. FAQ
How can I…

... decide which Ninox product do I need?

Ninox offers two product lines:

Ninox Cloud - our cloud service for any browser.


This is our subscription service. You can access your Ninox databases from any browser. You can manage roles
and authorizations for team work. Our cloud offers additional data security through extensive data protection
measures and is hosted in compliance with the GDPR. You can also access the Ninox Cloud teams from the Ninox
App.

The Ninox Apps for Mac, iPad and iPhone.


Here your data will be stored locally or in your iCloud. There is a one time payment for the Mac App, a one time
upgrade in the iPad App (only if you want to use the iCloud sync), the iPhone App is free. The Ninox App is
basically for a individual user. Synchronize databases from your iCloud on up to 5 devices with the same Apple ID
(requires Mac app and/or upgrade of iPad app).

... test Ninox?

The Ninox Cloud version is also our trial version, as it is hardly any different from the app in using the software.
We invite you to sign up for the trial version for 30 days. The trial period is not automatically extended and does
not automatically pass over into a subscription. Of course, you can transfer the databases you created during the
test phase into the Ninox App for Mac, iPad or iPhone later.

... use the iCloud Sync Feature?

With the iCloud Sync feature the same databases can be accessed from multiple Apple devices. To use the iCloud
Sync feature choose iCloud as store location when creating a database. A little cloud will appear on the database.
If you already created a local database you can duplicate and choose iCloud as store location.

To use the iCloud Sync feature on iPad, please upgrade to Premium.

... modify iCloud databases on another device?

Ninox databases can only be modified on the device they have been created on. Ninox has this setting to avoid
conflicts. With “reorganise” you can re-allocate the admin rights to another device. You find this function by
clicking the menu button of a database. On iPhone swipe the database to the right.

Attention: With this function the database will be newly created.


Please make sure that the database is up to date with synchronization to other devices before executing this
function. Otherwise you may lose the changes of the other devices.

... backup and share Ninox databases?

Ninox databases can be saved and exported as archives. The resulting .ninox files can be imported with every
Ninox version. Use “Save Archive as…” from the main menu in the top left corner to export archives. Use “Import
archive” from the start screen to import.

… export and import data?

Ninox allows you to import structured data via csv-import. Ninox will try to match columns in your csv file to data
fields in the database. Start the assistent be clicking in the wrench an seleting “Import data…”

Date fields are the hardest to get right. The Ninox date format depends on the system settings. Ninox will use
the”medium” system settings. If in doubt try “yyyy-mm-dd” – this will always work fine.

The wrench menu will give you “Export data…” to. An assistent will guide you.

Mac app: To export all tables select “Export data…” from the title page of the database (the one with the fancy
bachground image). Here you can export all tables to excel or export the Ninox database without data as an .ninox
archive.

… import my contacts?

With Ninox you can import all contacts from the Mac contact app.

Click on the database homescreen on –> import data.


In the following dialog choose “Contacts”.
Install table template
Import Contacts
3
Ninox User
Manual

… search?

Ninox provides two search functions – global and local search.

The global search can be accesses via the magnifing glass in the left side bar. Here you’ll search the whole
datadase.

To search a table only press “cmd + f” or use right click to select “find”.

… create an auto-incrementing number for invoices or clients?

Option 1: Create a trigger (“on create”) on table level like this:

'Invoice Number' := max((select Invoice).'Invoice Number') + 1

This will check all existing invoice numbers and will fill the field “Invoice Number” with the next number.

Option 2: A little bit more fancy – Create a trigger (“on update”) on table level like this:

if not 'Invoice Number' then

let y := year(Date);

let m := month(Date);

let d := day(Date);

let c := cnt(select Invoice where year(Date) = y and month(Date) = m);

'Invoice Number' := y + format(m, "00") + format(d, "00") + format(c, "00")

else

void

If will give you an invoice number like this:

2016122205

yyyymmddxx – where xx is a counter of invoices per month.

… create and read barcodes?

Click in any field and scan barcodes or QR-codes. The scanner (or camera) will work as an input device.

Output fields as barcode: You’ll need a barcode font installed on your system. In “Print” you can set the font for
every field seperatly.

Note that barcodes have the value stored like this:

*123456* (Note the asterisks)

… use the location Field?

To set a location:

Click into the location field.


Maps will open.
Find the location and double-click.
Give a name.

… restore local database with “time machine”?

Use “time machine” on your Mac to create regular backups of all your files.

Open finder
Open menu “go”
Press “alt”(+”Shift”): “library” appears
Select library
go to “Containers”
go to “de.ninoxdb.ninox-mac”
go to data
go to “Documents”
go to “data”
open time machine
go back in time
pick the database to recover
restore
4
Ninox User
Manual

Introduction

Learn what Ninox can do for you in the Basics chapter.


The tutorial will help you understand the main concepts of Ninox.

User interface

Learn how to create and manage databases on the Ninox start page.
On the database homepage you can:
Create and modify tables
Modify the data model
Adjust the options
Import data from different data sources
Use the calendar to visualize date-related records.
Take full advantage of the Ninox full-text search.

Tables

Tables are the fundamental concept of Ninox. Learn:

How to create and modify tables


Which data fields Ninox provides and how to use them
How to connect one table to the other to create table references and relations
How to use the data entry form
How to create views in order to filter, order, group and analyze data
How to use filters in views
Charttypes

Formulas and Calculations

With formulas and calculations you can add new data-fields or columns and calculate values or implement
triggers.

Formula Editor
Triggers
Mathematical Functions
Logical Functions
Text / Date functions
Function and Language Reference

Supplement

iCloud Sync
Import Data
Importing Linked Data
Importing from Bento
Importing Attachments
Exporting
Printing
Mass Data Updates
Ninox Pro Installation

5
Ninox User
Manual

2. Tutorial
2.1. Tutorial
First steps

The best way to learn about Ninox is by trying. Templates are a great resource to get to know about the
possibilities. To get you started, this tutorial will guide you with a step by step instruction to create your first
database with Ninoxdb from scratch.

Getting started with Ninox

You will learn how to build a client database. It is actually the “Invoices” template. You can also download this
template or find it in the templates section on the Ninox start page.

In this first part you will create a table to keep records of your customers. You will add text-fields for name,
address and company and choice-boxes with predefined values, such as your customer status or gender.

In the second part you will learn about the concept of data views. A data view is a representation of your table
data. You will create different views to highlight different aspects of your clients.

The third part shows how to create a database for invoices.You will create invoices for your clients and link
products to each invoice. We will highlight references between tables and shows how to calculate values like
sums, years and (total) prices.

6
Ninox User
Manual

2.2. Part I
In this part you will set up a database to keep record of your customers. We will add different data fields with
name and address of your customer. Finally we will customize the layout of data records and overviews.

Create a database

Start Ninox.
Click on “New Database”.

Enter a name for your database.

7
Ninox User
Manual

Choose where you want to store your database: on your local machine or in iCloud.

Selecting iCloud will enable the synchronisation feature.

Create a table

Once you have created a database the screen will show to the database homepage.

Note that the wrench icon is highlighted in red. This indicates that the administration mode is active. Click the
wrench to activate/deactivate the administration mode. You can create new tables in administration mode only.
Other features, like “data model” and “options” may also be available in the admin mode only.

Click on “New table”.

Add data fields to the table

Now you see the table editor. You can add data fields to your table by drag and drop.

8
Ninox User
Manual

Please follow these steps:

First enter a name for the table on the top left.

We recommend not to use special characters or white spaces for table names.

Start by adding text-fields for name, address and so on.

There are different data field types you can choose from, e.g. text, multiline text,numbers, dates or Email. The
order of the fields can be changed by drag and drop.

Add an Email-field
Add a Choice-field for “Gender”

Click “Save changes”.

You’ll get back to the database home screen. You will discover your newly created table “Costomers”.

Edit field properties

All fields have properties.

Click on the table Customers you just created.


Click on the choice-field “gender” to open and edit the field properties.

9
Ninox User
Manual

Now, you get to the field editor. For each field you can define and customize different field properties.

Click on “Add value” and add values for “Mr” and “Ms”

10
Ninox User
Manual

Now your table gets a dropdown box from where you can choose the gender.

Click on “Required” and choose “Yes” to make it mandatory for every data entry.
Click Ok to get back to the table field's editor.
Click on “save changes” to save and get back to the database home screen.

11
Ninox User
Manual

Input data

Now you get to the data view of your table and to start creating data records. The data fields you created before
will be shown as columns.

Click on top on “Create record” or in the first empty line to open the data entry form

Note that Ninox by default will only shows the first 7 data fields. You can customize which and how many fields
are displayed. It is possible to create different data views (We will be cover this in the 2nd part of this tutorial).

Click the (+) sign on top (“Create record”) or the first empty line to open the data entry form.

Now the data entry form opens with all the fields of the table you defined before.

Fill out the form


Create as many records as you like

Note that we have made the gender field compulsory before.

Edit the data entry form

The data form has a 4-Column Layout. You can customize the width of each data field.

Activate the Admin Mode by clicking on the wrench icon.


Now you can edit every data field.
Click on top of a data field to edit its properties.

If the admin mode is active you can change the layout of your form:

12
Ninox User
Manual

By pulling the white squares on the left and bottom you can adjust the size of each field.
Change the position of fields with drag&drop.
Click on the tab “Customers” on top of the form.

Add Layout Elements to the form

It is possible to add layout elements like heads, spaces and line breaks to structure the form. You can also add
tabs to your data entry form.

13
Ninox User
Manual

Add layout elements.


To save changes click on “Save changes” (in red).

When you go back to the table field editor you notice that you can also change and add layout elements from
here.

14
Ninox User
Manual

To get ready for the next chapter please create more records or try the CSV import to get data from other sources.

15
Ninox User
Manual

2.3. Part II
With Ninox you have a lot off possibilities how to look from several perspectives at your data. You can perform
operations and create different views.

Re-arrange columns

You can re-arrange the position of each column by drag&drop.

Click a table head and drag it left or right.

Sorting and table calculations

Click on any column head.

A dialog will open allowing you to perform different operations.

16
Ninox User
Manual

Data entries can be sorted ascending or descending.

Note the arrow in the table head indicates the sorting.

Calculations like count, sum or average can be applied (depending on field type).

Show and Hide Columns

Note that by default only the first 7 data fields of your table will be displayed in data view.

You can add or remove columns.


17
Ninox User
Manual

Click on the new tab and select “Edit columns” from the menu.
Click on fields on the left to hide them.
Drag & drop fields from the right to the left to show them.

To hide a column click on the name and choose “Hide Column” (No drag & drop here.):

18
Ninox User
Manual

Try this:

Hide all fields but city.


Drag and drop “State / Region”, “Country” and “Company” to the left.
Click “OK”.

The data view has changed. The data records have not changed.

Grouping

A powerful feature is grouping of entries.

Lets try this: We want to know how many clients do we have in every single state.

19
Ninox User
Manual

Click on any table head and choose “Show Comumn”.


Choose “State / Region”.
Click on the column head of “State / Region”.
Select “Grouped” from the menu.
Click on the column head of “Id” and select “count”

The result will show you how many clients there are in each state.

Click on the arrow on the left to expand the group and see its content.

20
Ninox User
Manual

Filters

Here you can use different methods to wrangle your data. We only want to display US companies.

Click on any table head an choose “Show Comumn”.


Choose “State / Region”.
Click on the column head “Country”.
Click on Filter and type in “US”.

Create Views

Ninox comes with several functions to process and aggregate your data.

Start by a adding a new data view.

21
Ninox User
Manual

Click on the top tab “(all)” and select “New view” from the menu.
Choose a name suitable name e.g. “State / Region”.

Now you have a new data view called “State / Region”. It looks just as your first data view.

With Ninox you can create several data views on the same table to look at your data from different perspectives.
Use re-arrange, show/hide comumns as described above to create customized views.

22
Ninox User
Manual

23
Ninox User
Manual

2.4. Part III


Relational Database

There is only one table (“Person”).

Open the database seen in first screenshot.

Lets add another table – click on “New Table”.


Add a new Table called “Books”, add fileds “Author” and “Title”.

24
Ninox User
Manual

Click “Save Changes” and see in the “Data model”-Tab:

Next we need a table “Readings”.


Create a select-type field “Rating” und a mulit-line Field “Notes”:

Relations and References

Click on “Create table reference” on the right.


Drag a reference to “Books” and “Persons” on to the “Fields”.

25
Ninox User
Manual

Select the form view of the table “Readings” an redesign it.

Like this:

26
Ninox User
Manual

The reference fields at the top.

Showing References

Cklick (in Admin Mode) on of the reference fields to change the display.

Select “Show as”

27
Ninox User
Manual

and type in this formula:“First Name” + ” ” + Last Name”

More References

Go to the table “Books”.

Here you’ll the reference to the “Reading” table.

Change the fields displayed in this reference-table.

28
Ninox User
Manual

So is looks something like this:

Formulars and References

Last thing we want to do is insert a formular field. It should refence the age of the person(s) having read the book
and display the avarage age.

Click on “+ Field” ta add a formular field.


The visual formua editor lets you create the formula with drag&drop.

29
Ninox User
Manual

The new Field “avg Readers age” is diplayed.

Open Ninox-Database Tutorial Part 3 to see details.

30
Ninox User
Manual

3. Introduction
3.1. Basics
Empowering any user to create business Apps for teams.

True to our motto, we support you in teamwork and increase your productivity. Use Ninox to create your individual
and customized business app.
Many templates give you a quick and uncomplicated introduction to the world of Ninox. Create tables and forms,
customize them using Drag & Drop and optimize your workflow. In this way, we would like to make a contribution
to making their daily work easier and to concentrate on the essentials.

Take a look at these examples of how other users take advantage of Ninox:

A cosmetician uses Ninox to manage customers, appointments and invoices.


A user-interface designer uses Ninox to keep track of her tasks, projects and deadlines.
A movie fan uses Ninox to organize his DVD collection: Which friend did he lend the third season of “The
Wire” to?
A mother of three uses Ninox as a book of household accounts to know how much her family spends each
month.
We use Ninox as our IT release management system for keeping track of bugs, change requests and planning
ahead

Which Ninox Solution is Right for Me?

Ninox comes in 3 different flavours:

Use Ninox Smart as an easy-to-use single-user database app on your iPad, Mac and iPhone. Data may be
synchronized between devices via iCloud.
Teams and small businesses will benefit from Ninox Pro, a one-click installable database for local networks /
intranets
In order to work location-independent, you may choose Ninox Cloud, a database-as-a-service (SaaS) solution.

31
Ninox User
Manual

3.2. First steps


The best way to learn about Ninox is by trying. Templates are a great resource to get to know about the
possibilities. To get you started, this tuactorial will guide you with a step by step instruction to create your first
database with Ninoxdb from scratch.

Getting started with Ninox

You will learn how to build a client database. It is actually the “Invoices” template. You can also download the this
template or find it in the templates section on the Ninox start page.

In this first part you will create a table to keep records of your customers. You will add text-fields for name,
address and company and choice-boxes with predefined values, such as your customer status or gender.

In the second part you will learn about the concept of data views. A data view is a representation of your table
data. You will create different views to highlight different aspects of your clients.

The third part shows how to create a database for invoices.You will create invoices for your clients and link
products to each invoice. We will highlight references between tables and shows how to calculate values like
sums, years and (total) prices.

32
Ninox User
Manual

4. User Interface
4.1. Start Page
The Ninox start page is where you open and manage your databases – for example, create new ones, change their
names or delete them.

a Tap on a database to open it and go to the database homepage.

b The menu button appears on the right side of the database label when you mouse over. Click on it to open the
administration menu.

‘Save archive as…’ allows you to send the database via e-mail or save in another App (like Dropbox). Use this
operation to create backups for your database.
‘Duplicate database…’ allows you to create a copy of the database. This can be useful, when you are about to
make significant changes in the database structure and want to keep an old version just to be sure.
‘Rename database…’ will change the name of the database. Keep in mind that database names must be
unique and special characters are not permitted.
‘Delete’ eliminates the database irrevocably after asking for confirmation.

c Use ‘New database’ to create a new one. Again, the name restrictions apply.

d Not only beginners will appreciate the template library.

Check back every now and then: we will be adding new templates on a regular basis.

e iCloud Sync

f The help menu allows you to:

Change the language settings.


Rate Ninox – Your rating helps us make Ninox more known and popular! And that enables us to put more
work into its development.
Access this online help document.
Contact our support team by e-mail – we try hard to reduce response times. If you have any ideas or wishes
related to our product, or if you have a question or you noticed an error, your feedback is welcome here. This
way we can solve your issue and continue to improve our service.
Get information about other Ninox products and services.

g This only concerns users of the iPad Version. Some operations are only available for users who have upgraded to
Premium. You can do that anytime as an in-app purchase. If you experience problems with the upgrading process,

33
Ninox User
Manual

check the following:

Do you have a valid iTunes account? (Settings => iTunes => Account)
Is your device connected to the Internet?
Do you have purchased the upgrade, but the Premium features don’t appear to be active?
Check on the homepage, if it says “Premium” next to the Ninox logo.
Close Ninox by pushing the home button twice and then wiping Ninox upwards. Restart Ninox. Go to the
upgrade menu and select ‘Restore previously purchased products’.

34
Ninox User
Manual

4.2. Database Homepage


When you open a database, you will get to the database homepage.

a) Click on the menu button to get more options. From here you can save databases as an archive. The resulting
.ninox file can be shared easily and opened with all Ninox Versions. The second option is to duplicate the
database. This might be handy when you want to change the store location from “local” to “iCloud” for example.
You also can rename databases. From here you can leave the database and return to the home screen, as well.

b) You can reach the database homepage anytime by tapping on the home icon.

c) Opens the Calendar.

d) Opens the Search page.

e) Tap on the X to close the table and hide it from the menu.

The second row is composed of several tabs. Tap on one to open it.

f) The wrench icon activates or deactivates the administration mode. This mode offers you several tools to
administer your database. For example, you can create a table, modify forms and adjust settings. As long as the
wrench icon is red, the administration mode is active.

The second row is composed of several tabs. Tap on one to open it.

g) Displays all tables in the database. Activate the administration mode and you can create new tables here.

h) The data model provides you with a better overview of the tables and their relations, especially in the case of
more complex databases.

i) Opens the options menu.

All tables are listed below the navigation bar.

j) Tap on a table to open it.

k) This table has one or many sub tables. Click on the menu button to see and open the subtables.

l) Opens the dialogue to create a new table.

m) Opens the template library for tables. As opposed to database templates, you can incorporate table templates
into existing databases.

n) Provides different operations for data import.


35
Ninox User
Manual

o) Provides different operations for data export.

2.2.1 Datamodel

The data model provides you with an overview of the tables and their relations (table references). That will be
useful, when you work with a lot of tables with multiple references. You have access to the data model only when
the administration

mode is activated.

a) Opens the data model.

b) Opens the dialogue to create a new table.

c) A table is shown as a black-framed rectangle with rounded corners. Tap on a table to open the dialogue to
modify the table definiton.

d) Table references are shown as an arrow. In this example, a table reference has been created from

Invoice

to

Client

– that is, a reference field has been generated in the

Invoice

table definition.

The direction of the arrow means that one customer can have many invoices. However, one invoice only belongs
to one customer.

e) The table

Invoice

contains a subtable:

Invoice Item

f) Subtables are shown integrated into their supertable. A subtable is created by referencing it to the supertable
and activating the option

Composition

36
Ninox User
Manual

In this example, a table reference has been created in the table

Invoice element

with the table

Invoice

selecting the option

Composition

(in more options).

This definition has several consequences:

1. Different presentation in the data model.


2. Subtables are not listed on the database homepage.
3. As soon as a data record is deleted from the supertable, all linked data in the subtable is deleted as well.
4. The form of the supertable does not provide the operation

Search and add

(magnifier icon) for the subtable.


5. The form of the subtable does not provide the operation

remove reference

See chapter

Table References

for further details about the different kinds of relations between tables and how to use them successfully.

2.2.2 Options

The option page provides general settings for the active database.

37
Ninox User
Manual

a) Opens the options page.

Printing Options

b) Change the default font-size for the print layout.

c) Choose the printing output: PDF or HTML.

Style Options

d) Tap here to upload your own background image from your photo collection. Please keep in mind that
background images might affect the performance of older devices.

e) Alternatively, you can choose from the pre-defined color schemes. Those backgrounds are more performance-
friendly.

38
Ninox User
Manual

4.3. Calendar
The calendar shows all data records that relate to a date. The calendar offers two different views: single week or
single month.

Weekly View

a) Activates the calendar.

b) Switches to the month view (see below).

c) Activates the weekly view.

d) Use the arrows to switch between weeks.

e) By default the week view shows only the five general working days. However, you can switch to a seven-day
view or display only one day in detail.

f) When ‘Only working hours’ is activated, the calendar shows only the time from 8 a.m. to 6 p.m., otherwise it is
the whole 24 hours.

g) The first line in the calendar view shows the events that last the whole day (e.g. birthday, due date). If you have
set table columns to the data type ‘Date’ and defined that they are displayed in the calendar, this is where the
corresponding records appear.

h) Data records that include appointments (data type ‘Appointment’) are shown according to their start and end
time. Just tap on an entry to open it.

Create entries

You can also create new entries in the week view: Tap on an empty area to enter an appointment at that time.
That only works, if you have at least one column with the data type ‘appointment’ in any table.

In the following dialogue you can set the time precisely. Now tap on one of the table names displayed to create
the corresponding data record.

Monthly view

In the monthly view appointments and date entries are displayed uniformly.

39
Ninox User
Manual

a) Activates the month view.

b) Use arrows to switch between months.

c) The current date has a blue background, Saturdays are light yellow and Sundays are light red. At this point,
holidays are not marked and can’t be configured.

d) Tap on an entry to open it.

How to Define Date Fields and Appointment Fields

You have to create date fields or appointment fields in one of your tables to be able to work with the calendar. For
date fields these are your options:

Show in calendar: defines, if the data records of this table are displayed in the calendar.
With color: determines which color is used to display the data records. Use this option to be able to
distinguish different entries quickly.
Anniversary: makes it possible to repeat an event each year, especially birthdays. Choose ‘Yes’ and the entry
is displayed on that day independently of the year.

40
Ninox User
Manual

4.4. Search
Search inside a table

Ninox offers two ways how to search inside a table:

Right-click on the table view


Strg + F on Windows or Cmd + F on Mac

1. Ninox searches in all data which are currently visible. To receive results from hided fields you need to make
them visible previously (via right-click Show column).
2. As a result you just see lines in which the seach term appears at least once.
3. After this step you can search through your results to achieve a more detailed outcome.

To redisplay all values you easily can press the space bar. That allows you to switch between all values and your
search result.

Search inside a database

Above we search inside a selected table. If you use several tables in one database it can be very helpful to scan all
tables in one step. Therefore you need to go to the Find field on the left part of the site.

41
Ninox User
Manual

5. Tables
5.1. Create and Modify Tables
Please activate the administration mode (wrench icon in the upper right corner) to create or extend tables.

A new table can be created on the database homepage or within the data model. Tap on the table name within
the data model to modify existing tables. Both ways will lead you to the table editor:

a) You can choose the table name quite freely and change it anytime.

Just keep in mind that you can’t create two tables with the same name.

b) The description field can help you keep track in more complex data models. It is shown in no other place.

c) Trigger on create will be executed only once when you create a new data entry.

d) Trigger after update will be executed each time when you change the data entry.

e) The global unique identifier is generated automatically by Ninox. It is of internal use only. Although you are
allowed to modify it, you should only do so for good reasons.

f) Shows a list of the defined data fields in this table (i.e. table columns). You can change their order by drag &
drop, which affects the following issues:

The field order determines the default order of the columns. Beyond that, the column order can be configured
independently – see chapter Views.
More importantly, the field order determines how forms are displayed.

g) Allows you to create new fields. Just drag a field from the right side to the left side – as shown with arrow (j). As
soon as you create a field, the field attributes dialog opens.

Check out the chapter data field types for an overview of the available fields.

h) Layout elements are no actual fields nor table columns. They help organise the forms.

i) Use table references to create relations between tables. For example, a table ‘Invoice’ can refer to another
table ‘Customer’.

k) Rename the data fields you just dragged to describe your data entry.
42
Ninox User
Manual

Field attributes

When creating a new field or tapping on an existing one, the dialog of field attributes opens. Depending on the
data type different settings are available. This example shows a text field:

a) You can choose the field name quite freely, as long as it isn’t empty or duplicated in the same table. You can
change it anytime.

b) If you define it as ‘required’, the field must be completed in every data record. However, Ninox isn’t very
restrictive: if you leave it empty, only a warning is shown.

c) Default values can help enter your data more quickly. Define a default value that Ninox uses to fill in this field
automatically for every new data record. Some data types even support special default values. For example, the
date field allows ‘today’ in order to set the current date.

d) Text fields allow the definition of the minimum and maximum length (number of characters). If the text exceeds
these limits, Ninox will give a warning.

e) See minimum length.

f) Sets the field width as displayed in forms. Forms are organized in four columns, so one field is at least one
column and at most four columns wide. If you don’t define the width, Ninox does so automatically.

g) Only for text fields you can define if it is multiline or not.

h) Under ‘more options’ the expert user can find additional options:

i) ‘Display field only, if:’ allows to hide a field in the form under certain conditions. This condition is defined as a
formula. Set the formula to ‘No’, in order to hide the field permanently.

j) ‘Trigger after update’ refers to a script which is executed after any modification of this field.

k) The global unique identifier is generated automatically by Ninox. It is of internal use only, although you are
allowed to modify it. That only makes sense for expert users.

l) Closes the dialog.

m) Deletes the field permanently after requesting confirmation. All data from this column is lost.

43
Ninox User
Manual

5.2. Data Field Types


Ninox supports several data types for the columns / fields of a table. There are four different kinds:

Data fields are filled in with data.


Formulas are used for automatically calculated results.
UI elements help with structuring the forms.
Table references allow you to relate tables to each other.

Data Fields

General options:

Required determines, if this field must be filled in. If there is no value entered, Ninox shows a warning.
Default value defines a value that is filled in automatically by Ninox, anytime you create a new record.
Width gives you the option to adjust the field width as shown in the form.

Additional options:

Trigger after update defines a trigger.


Display field only, if allows to hide a field in the form under certain conditions. This condition is defined as a
formula. Set the formula to ‘No’, in order to hide the field permanently.
Global unique ID is generated automatically by Ninox. It is of internal use only. Although you are allowed to
modify it, you should only do so for good reasons.

Text

Text fields are among the most important data types in Ninox. Use them to enter single-line or multi-line texts.
Sometimes text fields even are the best way to record numeric values: this is true for numeric codes such as
postal codes, item numbers and telephone numbers. (A code might start with a ‘0’ which a number field does not
allow.)

Options:

Minimum length determines the minimum number of characters that must be entered in this field. If this limit
is undercut, Ninox will give a warning.
Maximum length determines the maximum number of characters that can be entered in this field. If this limit
is exceeded, Ninox will give a warning.

Text (formatted)

As opposed to normal text fields, the field type text (formatted) supports the input of longer texts and especially
their formatting. This way you can use bold, italics and underlined multiline texts as well as headers and bullet
points.

Text (formatted) is suited well to record descriptions and additional information. You shouldn’t use text
(formatted) as a substitute for normal text fields, though, because there are some limitations compared to normal
text fields:

The sorting order might be affected by text formatting.


There are no options for validation available.
Is not included in summaries or previews, for example in search results.Therefore, use text (formatted) for
fields like ‘Comments’, ‘Notes’, ‘Remarks’. In the case of fields like ‘Name’, ‘Title’, ‘Category’ we recommend
that you use the normal text field.

Number

Number fields record number values and support their formatted output, for example as an amount in a currency.

Options:

Minimum determines the minimum value. If this limit is undercut, Ninox will give a warning.
Maximum determines the maximum value. If this value is exceeded, Ninox will give a warning.
Number format determines how the number will be displayed. Note: The format ’23 %’ adds a percent sign to
the number. However, the number is not recognized as a percentage when doing calculations, so that you
might have to divide by 100 to get the result you are looking for.

Yes / No

Yes / No-Fields have three states: Empty, Yes and No. They are shown in the form as a simple drop-down menu. If
you want to avoid the state ‘Empty’, you should define the field as ‘required’ and choose a default value.

Choice

Using choice fields you can create self-defined value lists which appear as drop-down menus in the form. Instead
of entering a word or number, you pick one of those values. This field type is suited well to record a state, for
44
Ninox User
Manual

example ‘open’, ‘done’, ‘deleted’. In addition, you can set a background color and/or an icon for each value. Both
are also displayed in table views helping you to keep track easily, for example, of the states of your to-dos.

If you re-name a value later, all data records will be updated accordingly.

You can change the order of the values using drag & drop, which will affect the order of values in dropdown
menus.

Date

Date fields record the date, but no time. They are suited for birthdays, whole-day events, invoice dates etc.

Options:

Show in calendar defines, if the data records of this table are displayed in the calendar.
With color determines which color is used to display the data records. Use this option to be able to distinguish
different entries quickly.
Anniversary Makes it possible to repeat an event each year, especially birthdays. Choose ‘Yes’ and the entry
is displayed on that day independently of the year.

Time

Time fields record a time which is unrelated to any date.

Date + Time

Use Date + Time to record a time specification with date and hour in the same field.

Time Interval

A Time interval is the time between two points in time. A Time interval is the most precise method to measure
time, because several days, hours and minutes are supported. If you want to register worked hours, for example,
you could use Time interval to record the idle time.

If the time you want to measure is below 24 hours, it might make sense to ‘misapply’ an hour field, because the
hour field is more user-friendly.

Appointment

Appointment fields record two points in time – start and end – in the same field. Also, appointments are shown in
the week view. If your database includes a table with a date field, you can create new appointments directly in the
calendar.

Image

Image fields let you insert photos from your camera or other images from your library into your records.

URL

With URL fields you can enter an internet address and call the web browser to open that address.

Email

Email fields let you enter email addresses and support sending emails directly

from Ninox.

Options:

Subject: you may enter a subject line that will be automatically added when hitting the email button on that
email field. It even allows for embedding calculated values with formulas.
Body: as with subject, you may enter a default email body.

45
Ninox User
Manual

5.3. Table References and Relations


Table references – also known as relationships or links – are one of the most important features of Ninox. The
ability to create relations between tables differentiates Ninox from many other apps which only allow the
adminstration of simple lists. In addition, table references are one of the main differences between real databases
and spreadsheet programs.

If you don’t have a lot of experience with database systems, you should read this chapter to learn which different
types of relations exist and how to use them effectively.

Basics: The 1:N Relation

Ninox supports – as most relational database systems do – 1:N-relations as a foundation. That means that one
data record from one table is assigned (related) to many data records from another table.

A good example are clients and invoices. You can assign as many invoices as necessary to one client. However, for
each invoice there can be only one client assigned.

We would like to introduce you to this topic also with example data on Ninox. Inside the database Data model,
relations, constraints are two important tables: Client and Invoice with the following data model and including
these values:

Data model Client Invoice

You define this fundamental relationship by creating a table reference from the table Invoice to the table Client:
The invoice is linked to one client.

You need to do this step by the following way:

1. Go to the Invoicetable form view.


2. Activate the Administration mode.
3. Click on one field into the table and select Link to from the following menu which should appear.

46
Ninox User
Manual

4. Please select Client and now both tables are related with each other and the data model now should look
like this:

If you go to the form view of Invoice now, you will find only one field to enter / select the client. Switch to the
form Client

and you will see an embedded table of all the invoices related to this client. Just to give you an idea how the result
can look like we assigned zero invoices to Martin, one to Philipp, two to Steven and four to Thomas. As a result we
get different numbers of invoices for each client, but every invoice has just one client. Two examples from the
Client table:

We assigned zero invoices to Martin, so there are no Invoice numbers related to him.

47
Ninox User
Manual

We decided in advance that Thomas is linked to four invoices and now we have four different Invoice numbers
linked to him.

On the other hand, for every Invoice number we have just one client record which looks like this into the table
with form view:

Subtables: The Composition Relationship

A special form of the 1:N-relationship is the composition, where composition means something like ‘consists of’. A
good example for this case are invoice items. An invoice consists of several items. If the invoice is deleted, the
invoice items become obsolete.

You can define a table reference as a composition relationship (also retroactively) by setting Composition to Yes
under More options in the field attributes.

The consequences are:

In the data model the table is displayed as a subtable of the referenced table (supertable) – integrated
entirely.
On the database homepage the subtable can’t be found anymore.
By deleting a data record in the supertable, all related data records in the subtable are eliminated.
The form of the supertable does not provide the operation Search and add (magnifier icon) for the subtable.
The form of the subtable does not provide the operation remove reference.

Subtables are good for elements that are linked together closely, for example:

Invoice items belong unequivocally to one invoice.


A telephone number is firmly linked to a contact. If the contact is deleted, the telephone number should be
deleted as well – it is of no use without the contact information.

Contrary examples:

The employees of a company shouldn’t be listed in a subtable, because they exist independently of the
company: they might change their employer.
Invoices for one costumer
An invoice item is – as seen above – a subtable of an invoice. It should have a normal relationship with the
article (product, service), though.

Relationship Tables: the N:M-Relationship

Sometimes 1:N-relationships or compositions, respectively, don’t suffice to represent the circumstances of the
48
Ninox User
Manual

case. Like most relational database systems, Ninox doesn’t support N:M-relations directly. However, real N:M-
relationships should be the exception; in most cases that kind of relationship will be qualified further, that is,
enriched with more data.

An example: In the table Firm we are entering firms. Another table Person gathers contact information of
individuals. Now we want to assign which person works for which firm. The simplest model would be a reference
from Person to Firm. However, if you want to include the fact that one person can have several employers or
change their employer over time, this model is not sufficient.

In that case you need a third table, for example Employee. At the creation of that table, you define two
references: one to Firm

and another to Person. Both relationships should be marked as Composition, because, if the firm is deleted, it
doesn’t have employees anymore; and if a person is deleted, they are no employee any longer.

Notes:

Although Employeehas got two composition relationships, the table is not displayed as a subtable.
Obviously, Employee can’t be the subtable to two different supertables.
Keep in mind the consequences of a composition relationship to the deletion of data records: if a person is
deleted, the employee will be deleted, but not the firm. If a firm is deleted, all its employees will be deleted.
The persons stay untouched, though.

The table Employee is a so-called relationship table, because it models the relationship between persons and
firms. In addition to this main purpose, you can use this table to enrich the relationship with valuable information.
Examples would be fields for the entrance and exit date or the salary. This converts the table into a display of the
working condition or even the employment contract.

Relationship Networks

The three basic kinds of relationships can be expanded in any way. There are no boundaries to creating higher-
grade relationships – for example between three tables.

It might be helpful, if you outline your database on paper first.

First draw all the objects you want to manage as boxes. Each box represents one table. The next step is to think
which relationships exist between these objects. 1:N-relationships can be drawn as an arrow. If that doesn’t
suffice, you must include another box as the relationship table.

Take care that you don’t create redundant (unnecessary) relationships. Follow the arrows: If you can get from box
A to box B on two different ways, you should rethink whether those two paths actually represent different issues.
If not, you can simplify here.

At last, some advice: don’t try to cover all possibilities. Sometimes it is better to use a more simple model and to
indicate potential exceptions applying comments or other tools. KISS – Keep It Simple, Stupid!

Constraints

Sometimes datasets which are related with each other can be very large and it can be very helpful to restrict
working steps. For example you can reference tables like Employee and Company.

Company Employee

49
Ninox User
Manual

If you referenced them like described in the paragraph above, you can assign a company to an employee through
the following dialogue which is reached through klicking on your desired employee.

One possible constraint could be that it is just allowed to select companies located in the same country than the
employee.

Therefore you need to click on Actions and select Edit fields. Please choose your table reference which
should be restricted which is Companies in this case.

Please click on More Options and go to the Constraints field. Enter your desired restriction via the visual or the
text view. For this example one way to solve the problem would be the following code:

a.Country = b.Country

Please note that your constraint is just valid for future selections from your table reference. Requests from the
past remain unaffected.

Drag & Drop can be very helpful to figure out which table has which letter in front of the column title.

50
Ninox User
Manual

5.4. Forms
Ninox automatically creates a form for each table. The basic structure of a form is determined by the data fields
and the layout elements and their order as defined in the table settings.

Field Order

Ninox spreads the data fields over 4 columns. One datafield can be between 1 and 4 columns wide. The field width
is calculated automatically and can be changed manually in the field attributes.

As long as the administration mode is activated, you can change the field order directly in the form using drag &
drop. Just drag the the field label (see arrow e).

Also, you can tap on the wrench icon next to the field label to open the field attributes. (encircled d).

Tabs

Forms are divided into several tabs. Two tabs are created automatically. The first tab (a) is named after the table:
it includes all the data fields. The last one (c) is marked with a file icon: you can upload as many file attachments
here as you want. More tabs can be added manually.

To add a tab (b) go to the table properties and select a layout element “tab”.

You can change the tab name afterwards. Tap on the new tab to activate it. Tap again on the now activated tab to
open the menu. Use the white field to rename the tab.

You can interchange data fields between tabs using drag & drop. Simply drag a data field onto the label of the tab
you want to move it to.

If you want to delete a tab, choose the operation ‘Delete tab’ from the tab menu. The data fields will be moved to
the previous tab.

(f) Don't forget to save your changes.

Other Layout Elements

You can add more layout elements via the tab menu, namely:

Heads, dividing the form visually into different areas


Spaces, leaving one column empty

51
Ninox User
Manual

5.5. Views
Views allow you to assort, group, filter and analyze your data in different ways.

Working with Views

a) When a table is opened, the first row of the navigation bar shows the table name. There can be several open
tables at the same time. Tap on the table name to show the table. Tap on the white X to close the table.

b) With + you can create a new record, i.e. a new row in the table.

c) For each table Ninox creates a standard view called ‘(all)’. Switch between views by tapping on the view name.
The active view is shown in blue with a white arrow.

d) Tap on the name of the active view to open the view menu (see below).

e) Create a new view.

f) Refreshes the active view. This is sometimes necessary when data is updated.

g) The icons next to the column labels show, if the column

if a filter is applied,,
determines the table order assorting the values in ascending or descending order,
is used to group the table.

The table in the example above has been grouped by Status; for more information see below.

h) Sorting: Assorted columns are marked by an up-arrow (ascending order) or a down-arrow (descending),
respectively.

i) You can vary the column width by moving the right border of the column header.

j) You can also re-arrange the order of the columns. Drag the column label to the left or right, until another column
label is highlighted in red.

k) Tap once on a column header to open the column menu (see below).

l) Grey rows indicate groups. Tap on the row to show or hide the group members. The number in the gray row
represents the column sum of that group (or count, average or others, as explained below).

m) In this example, the group header of the column ‘Street’ has been set to ‘count’.

n) Click on the ID row header on the very left to select single entries. This will be indicated with a tick mark (o).
52
Ninox User
Manual

p) By tapping on a row the entry form opens. Also, you can right click to open the context view menu and modify
your selection:

Clear selection or select all (r), toggle (reverse) selection, i.e. all the visible records not selected before become
selected now. (s), or select all (t). When you save the view, that includes the current selection. (u) Show selection
will hide all entries that are not ticked. That operation can be useful for research, for example, if you want to
select certain customers for a marketing campaign (like a newsletter). (v) You can delete the selected rows, as
well.

q) Opens the view search. With this search you can look for entries only within this specific view. You can also
open the search by just typing.

The View Menu

a) Views are shown as a table by default.

b) Tap on ‘chart’ to display the view as a chart.

c) The print preview optimizes the view for printing.

d) Find, also opens the view search. You can also just start typing.

e) As described above, you can select several data records. Here you can clear the selection.

f) If you toggle the selection, the selection is reversed, i.e. all the visible records not selected before become
selected now.

g) Selects all visible records.

h) Expands all grouped items.

i) Collapses all grouped items to only show the groups.

j) Reduces the view to the selected data records. Press again to show all the records again.

k) Deletes all selected rows from the database.

l) Use mass data updates to modify the selected records at once.

m) Exports the selected records to another program / app.

n) Create a new view. This is the same as clicking the plus sign on the right side of the tabs.

o) Rename the view.

53
Ninox User
Manual

p) Deletes the current view. This does not delete any data.

q) Opens the dialogue to modify the table, that is, the actual data fields.

r) Opens the dialogue to configure the columns of this view (see below). Here you will find even more options to
modify the view to your liking.

The Column Menu

If you tap on a column header, the column menu opens and provides quick access to the most important settings.
‘Edit columns…’ allows for more detailed settings.

a) Change the name of the column.

b) You can apply formulas to the column.

c) Defines a filter. Only records that match the filter are shown.

d) For Choice and Yes/No fields you can select from a drop menu as, well. For other fields you can type to filter.
Use != to exclude values from the view.

e) Uses this column to put the data in ascending order.

f) Uses this column to put the data in descending order.

g) Groups or ungroups by this column.

h) Count the number of entries. The number will appear on the bottom line.

i/j) Show the value of the first or last entry. This also appears on the bottom line.

k) Concatenate gives out a list of all values.

Depending on the the data type there might be different group values available:

Sum – the sum of all values


Average – the average / mean of non-empty values
Minimum – the minimum non-empty value
Maximum – the maximum non-empty value

The column values or group values are displayed in the column footer or the group header (grey), respectively.

l/m) Hide or shows columns.

54
Ninox User
Manual

Configure Columns

Get to the view menu by tapping on the view header to find the operation ‘edit columns…’.

On the left side all shown columns are listed. Use drag & drop to change the order.

a) Tap on an entry to open the column settings (see below). The icons next to the column name indicate, if filters,
sortings or groupings are used, and if a column value is defined.

b) On the right side, there is a list of the available data fields.

c) Drag an element from the right side to the left to include it as a table column.

d) Data from linked tables is also available. Tap on the reference field to list the data fields of the linked table. You
can drag those fields onto the left side the same way.

e) Adopts the changes.

f) Cancels the operation.

Column Settings

55
Ninox User
Manual

a) The column name is set by Ninox by default to the field name (grey font). However, you are free to choose
another name.

b) For each column there is a formula. If you created the column by dragging a field (see above), the formula
equals the field name. You can change the formula by tapping on it. The Formula editor opens.

c) Sets the filter for the selected column.

d) Sets sorting and grouping.

e) Defines the column value or group value.

f) Hides the selected column (eliminates it from the list on the left).

g) Closes the dialogue.

56
Ninox User
Manual

5.6. Views: Filtering Values


One of the basic functions of Ninox is the ability to filter data in a view, this means to display only certain data.
The Basics of working with different views is discussed in the previous chapter. At this point, the filter options will
be explained in more detail.

Simple Filter

Place a filter by clicking on the column head.

In the field “Filter” you can enter any search text. Ninox then displays only those records that contain this text in
the appropriate column. Uppercase and lowercase is ignored.

Of course filters can be placed on multiple columns. In order for a record to be displayed, it must meet all the
filtering criteria (logical AND).

Filter Expressions

Ninox also supports more complex filter conditions in the Filter field above.

=”Value” Exact comparison with a string


like “Value” Checks whether “value” is ignoring uppercase
and lowercase
letters
=1234 Exact comparison with a number
>100 Greater than 100 100
>=100 Greater than or equal 100
<100 Less than 100
<=100 Less than or equal 100
!=100 Inequality 100

These terms may also be combined. Ninox supports three logical operators AND, OR, and NOT. Some examples:

>10 and <100 Between 10 and 100 (exclusive)


>=10 and <=100 Between 10 and 100 (inclusive)
not like “done” only rows that contain “done”
Only rows that include "done" or
like "done" or like "reset"
"reset"

Date Filter

For columns with dates Ninox supports the entry of a complete or even partial date in the filter:

03/25/2015 Only the 03/25/2015


03/2015 All data in March 2015
2015 All data in 2015

Comparative filter supports Ninox at this point not yet, a small detour but this is also possible: “Show Columns …”
column with the function from the View menu. Insert the formula

format(date, "YYYY-MM-DD")

Then you can compare how

>="2016-02-01" and <="2016-02-29

to work

See empty values

With the filter expressions = null or! = Null can be checked on empty.

Advanced filtering options

In some cases, filters can not be implemented through the mechanisms described above. For example, if you want
to combine data from multiple fields to a combined criterion. But these cases can be covered with Ninox. The trick
is to define the filter over an additional calculated column.

Use the function “Show Columns …” from the View menu and drag a formula in the list of visible columns. In this
formula, you can access all the fields of the table, also from the fields of linked tables. Ideally, you build the
formula so that it returns a Yes / No value. Then you can create a filter for this calculated column to “Yes” or “No”.

57
Ninox User
Manual

If you want, for example, show all rows that have a date in the future, you can do this on a computed column:
Define a column with the function:

Date> Today

and date> Today () with textual input of Fomel.

Set the filter for this column to “Yes”.

58
Ninox User
Manual

5.7. Charts
If you have entered your values into a table sheet, Ninox automatically creates several types of charts.

Please select the Chart-view and Ninox displays the data from your table. On the right sight you can decide
which kind of diagram you would like to create.

Following types of charts are available:

Bar Chart Bar Chart (Stacked)

Line Chart Pie Chart

Doughnut Chart Polar Area Chart

Radar Chart Bubble Chart

59
Ninox User
Manual

All of them have in common that Ninox uses the first column for the values on the X-axis. The first column with
numerical values is going to be selected for the Y-axis. If you have different columns with numerical values and
you wouldn't like to use the first numerical column for the Y-Axis you need to hide all columns before your desired
column.

The option Stacked makes it possible to total all your function values. So all your pillars from one argument are
going to merged to one single pillar.

If there are different arguments displayed you can easily hide them by clicking over the coloured symbol over the
table.

In general it is necessary to have two columns in your table, one for the X- and one for Y-axis. There is one
exception: To display a Bubble chart it is required to have three numeric columns: Two for the X- and Y-axis and
one for the radius.

With Data series you can decide if data should be display as function of columns or of rows.

60
Ninox User
Manual

5.8. Update multiple values


This is a handy feature to update and change many records at once. It is useful if you want to change the field
type or add new fields to the table with values from other fields.

Click on the tab of your data view to open the dialogue.

First of all, you can choose which records to update.

Click on the bottom left on the drop down menu.

There are two options to choose from. Update visible records will affect all records that are currently visible in
your data view. Update selected rows will only affect rows you have selected. To select rows click on the left of
your data view and set a check mark as you see some in the screenshot above.

Options to change records:

Select from the drop down menu next to each data field.

61
Ninox User
Manual

Don’t change will leave the field as it is.

Assign constant value will give the same value to all selected fields.

Assign calculated value allows to use a formula. This is useful if you need to transfer a field from number to text
for example. Also if you like to combine two fields into one.

Empty field will empty all values.

Now click on next to get on the import preview.

In the preview you see the impact of your changes marked in blue. In this example a formula was used to combine
Last and First Name into one Field with the full name.

62
Ninox User
Manual

6. Calculations
6.1. Formulas
Ninox uses formulas in different situations. The following screenshot shows how to define a formula field in a
table.

a) Like any other field, a formula field has got a name that is shown in the form or as a table column.

b) Tap on the field ‘Formula’ to open the formula editor.

c) If the formula returns a numeric value, you can set a number format for the result. This way, you can have the
number displayed as an amount of money, for example.

d) Also, you can determine the field width of the formula in the form.

The Formula Editor

The formula editor opens on the lower screen half. It is divided into three areas: the big white field contains the
inserted formula, followed by a list of elements that you can add to the formula: data fields, calculations and so
on. If the formula is incomplete or incorrect, there will be a warning above the formula.

Drag the elements you want to add from below into the white formula field. The position where the element is
about to be integrated will light up in red.

63
Ninox User
Manual

In order to delete the element, drag it from the white field upwards..

e) The formula field

f) Add new elements using drag & drop.

l) Cancels the editing process of the formula

m) Confirms the entered formula. The entry can only be confirmed, as long as there is no formula error marked.

k) You can also use the text editor to type in formulas with Ninox language.

Formula Elements

g) Fields

Among ‘fields’ there are all the fields of the active table – which are relevant for formulas. The first row is the table
name, below there are the data fields.

Table references are special: they are shown in blue; you can’t drag them directly into the formula. Tap on the link
instead. Now, all relevant fields from the referenced table are shown. In the first row you can navigate back.

If you follow a reverse reference (<=), then you won’t be able to drag their data fields directly into the formula
(also blue). Tap on the data field to obtain a list of possible aggregations: sum, average, minimum, maximum,
count etc.

h) Calculate

The tab ‘Calculate’ comprehends all available mathematical operations, as well as an entry field for constant
numerical values (1234).

Reference of the mathematical functions

i) Logic

Under the tab ‘Logic’ you can find functions for conditioned calculations (if / then / else), logical references and
comparative operators.

Reference of the logical functions

j) Text / Date

Text-related and date-related functions are filed under the tab ‘Text / Date’. When you calculate with dates, please
keep in mind the special abilities of the operators +,-,*,/. Use ‘+’ to concatenate strings.

64
Ninox User
Manual

Reference of the text and date functions

65
Ninox User
Manual

6.2. Triggers
Triggers are a powerful tool for experienced users. With triggers it is possible to copy (even calculated) values
from a table to another linked one. You should only use triggers, if the same result cannot be achieved with a
simple formula field.

A trigger is an operation that is executed each time when the corresponding field is changed.

You can create a trigger on any data or table reference field. Go to the field settings and expand “More options”.
There you’ll find the option “Trigger after update”. Clicking on that option will open the formula editor. For
triggers, the formula editor sports an additional tab: “Commands”. Commands allow you to assign calculated
values to data fields within the same table.

Example

A good example for using triggers effectively are invoices. Consider an invoice which consists of several invoice
items. Each invoice item refers to an article in your stock. At any given point in time an article has a specific sales
price. But that sales price may change over time.

When creating an invoice item for the invoice, the user has to select the corresponding article and assign a
quantity. The straight forward approach to calculate the invoice item’s total would be to define a formula like
“Quantity * Article.Price”. But as stated above, the article’s price may change later on, which would render the
invoice invalid.

To cope with changing prices, the better solution is, to define a data field for the unit price right in the invoice
item table. Also, that would allow for special rebated prices on each invoice. Drawback: Now the user has to enter
the article price manually each time he creates a new invoice item.

Here, triggers come into play. A trigger on the table reference Article can do that work automatically: Just define
“Price := Article.Price” to copy the price, each time the article is assigned / changed.

66
Ninox User
Manual

6.3. Mathematical functions


1234: Enters a constant number.

Addition: the addition (a + b) results in

(Number + Number) the sum of a and b, if both are numeric values,


(Text + …) or (… + Text) a compound text of a and b,
(Date + Number) the date a increased by b days,
(Date + Time interval) a date/time, that is date a increased by b,
(Time + Number) the time a increased by b milliseconds,
(Time + Time) the sum of time a and time b,
(Time + Time interval) the time a increased by the time interval b,
(Date/Time + Number) the date/time a increased by b milliseconds,
(Date/Time + Time interval) the date/time a increased by the time interval b,
(Time interval + Number) the time interval a increased by b milliseconds,
(Time interval + Time interval) the sum of both time intervals a and b.

Subtraction: the subtraction (a – b) results in

(Number – Number) the Number a – b,


(Date – Date) the time interval from b to a,
(Time/Date – Time/Date) the time interval from b to a,
Subtract b from a, see: addition

Multiplication: multiplies (a * b)

(Number * Number) the number a * b,


(Time interval * Number) the time interval a * b,

Division: divides (a / b)

(Number / Number) the number a / b,


(Time interval / Number) the time interval a / b,

√{} (x) calculates the square root of x.

(x) calculates the square of x.

^ (x, y) calculates the power of y to the base of x, in other words, x to the power of y.

( x ) calculates e to the power of x.

log10( x ) calculates the logarithm of x to the base 10.

ln( x ) calculates the natural logarithm of x, that is, to the base of e.

Logarithms to the base of y can be calculated with ln( x ) / ln( y ).

sin( x ) calculates the sinus of x (as a radian measure).

cos( x ) calculates the cosine of x (as a radian measure).

tan( x ) calculates the tangent of x (as a radian measure).

asin( x ) calculates the arc sinus of x (as a radian measure).

acos( x ) calculates the arc cosine of x (as a radian measure).

atan( x ) calculates the arc tangent of x (as a radian measure).

atan

( x ) calculates the square arc tangent of x (as a radian measure).

round( x ) rounds x to the nearest whole number.

round up( x ) rounds x up.

round down( x ) rounds x down.

67
Ninox User
Manual

sign( x ) results in -1, if x is negative, else 1.

absolute( x ) calculates the absolute amount of x, that is, x without a sign.

Example: absolute( -10 ) = absolute( 10 ) = 10.

68
Ninox User
Manual

6.4. Logical functions


Logical functions allow to differentiate from one case to the other. There are three fundamental elements:

if / then / else,
comparisons,
logical references.

Case Differentiation

The construct ( if a then b else c ) checks first, if condition a is correct. If it is, it will calculate b, else c.

As a condition you need an expression which returns Yes / No. That can be:

a Yes / No field,
a comparison,
a logical reference.

Example:

(if Yes then 1 else 2) always will return 1


(if No then 1 else 2) always will return 2
(if Age >= 18 then “of full age” else”minor”)

Comparisons

Comparisons always return a Yes / No value.

(a = b) a equal b

(a ≠ b) a unequal b

(a < b) a less than b

(a ≤ b) a lass than or equal b

(a ≥ b) a greater than or equal b

(a > b) a greater than b

(a like b) textual comparison between a and b where capital letters and several special charactersare ignored.

Logical Combination

Using logical combination you can construct more complex conditions. They need a Yes / No value as an argument
and return a Yes / No value as well.

Yes the constant value Yes

No the constant value No

(a and b) results in Yes, if a as well as b are Yes – else No.

(a oder b) results in Yes, if a or b or both are Yes – else No.

(not a) results in Yes, if b is No – else No.

69
Ninox User
Manual

6.5. Text / Date Functions


Text enters a constant text.

trim( Text ) eliminates spaces at the beginning and at the end of the Text.

Lower case( Text ) converts the Text into lower case letters.

Upper case( Text ) converts the Text into upper case letters.

Left pad( Text, Number, Fill-in text ) creates a text that is at least Number characters long. If the Text is shorter
than Number characters, the Fill-in text will be put in front so many times that the defined length is reached.

Right pad( Text, Number, Fill-in text ) works like left pad, but puts the Fill-in text behind the Text.

Substring( Text, Start, End ) Extracts a part out of the Text from Start (inclusive) to End (exclusive). The count
starts with 0, that means 0 represents the first character of the Text. Examples:

substring( “Hallo World!”, 0, 5 ) returns “Hallo”.


substring( “Hallo World!”, 6, 10 ) returns “World”.

format( Number, Format ) converts a Number into a formatted text. As Format a Text is needed:

0 represents a number or 0
# represents a number that is diplayed only, if the number is big enough
. represents the decimal separator (will be formatted according to the country, that means, in the UK and US
it is shown as a floating point)
, represents the grouping separator (will be formatted according to the country,that means, in the UK and US
it is shown as a comma)

Examples:

format(42.5, "0") results in "42"


format(42.5, "000") results in "042"
format(42.5, "000.00") results in "042.50"
format(42.5, "0.00") results in "42.50"
format(42.5, "#,##0.00") results in "42.50"
format(1042.5, "#,##0.00") results in "1,042.50"

Date functions

The following functions can be applied to Appointments and Date / Time as well. For appointments the start date
is used.

year( Date ) returns the year.

month( Date ) returns the months.

day( Date ) Returns the day of month.

weekday( Date ) Returns the weekday.

Year/Month( Date ) returns a text composed of year and month. This is useful for month-based analyses. Use this
function to group a table by months.

Start( Appointment ) calculates the start time of the Appointment.

end( Appointment ) calculates the end time of the Appointment.

Duration( Appointment ) calculates the duration of the Appointment, applying the following formula:

Duration( Appointment ) = End( Appointment ) – Start( Appointment ).

age( Date ) calculates the current age (of a person) in years.

today returns the current date.

70
Ninox User
Manual

6.6. Reference of Functions and Language


NX, the Ninox query language, is a powerful programming language which allows you to quickly extend Ninox
databases with calculations and trigger actions.

While Ninox provides a visual function editor as described in the online manual, it also sports a text-mode for
entering more complex expressions. This manual covers the text mode.

Here is an example database covering most of the topics of the tutorial.

Basic Arithmetics

NX provides arithmetic operations comparable to most other programming languages:

1+2=3
3-2=1
2*3=6
10 / 5 = 2

Arithmetic operations respect the typical operator precedence:

1 + 2 * 3 = 1 + (2 * 3) = 7

Expressions may be enclosed in parentheses:

(1 + 2) * 3 = 9

Note, that NX will automatically remove insignificant parentheses, i. e. if you enter 1 + (2 * 3) it will store this
expression as 1 + 2 * 3.

String Operations

A string, i. e. a sequence of characters, may be entered enclosed in double-quotes:

"Hello World!"
"This is a string."

Strings may be concatenated using the + operator:


"Hello World!" + " " + "This is a string."
"Hello World! This is a String."

Strings may also be concatenated with other values:

"Hi " + 42 = "Hi 42"


2 + " fast " + 4 + " U" -- "2 fast 4 U"

To enclose a double-quote within a string, it has to be escaped as “”:

"Hi, my name is ""Sally""!"

Working with Fields

Most NX functions operate in the context of a specific record. NX gives you access to all fields of that record.
Consider a table Customer consisting of fields First Name, Last Name, Street, ZIP, City. To generate the full
address line, you may enter:

Street + ", " + ZIP + " " + City

Some field names may contain special characters like spaces, dots, colons and so on. Also they may collide with a
reserved keyword of NX, like if, then, else. To work around this, field names can be enclosed in single quotes:
'First Name' + " " + 'Last Name'

If a field name contains a single quote, this has to be escapes as '' (two single quotation marks/inverted commas):

'Last year''s total revenue'

Note, that NX is agnostic to field name changes. That is, if you’ve entered an expression referring to a field and
you change that field’s name afterwards it will not have an impact to the expression. This is due to the fact that
NX internally stores the expression with a reference to the field’s ID (which cannot me modified). Actually, if you
open the function editor again, it will reflect the field’s new name.

Working with Table References

NX expressions can navigate along table references as well. Table references are always one-to-may
relationships, e.g. one Customer may have many Invoices — where the table reference is defined as from Invoice
to Customer (Invoice => Customer).

71
Ninox User
Manual

To display the Customer’s name in an Invoice, you’d write:


Customer.Name
Customer.'First Name' + " " + Customer.'Last Name'

Expressions may even jump along multiple hops, consider the case where a Customer has a reference to a
Company. You could then display the Company’s in the Invoice as well:
Customer.Company.Name

Vice-versa, it’s also possible to get invoice information for a Customer. Remember, that a Customer may have
multiple Invoice’s. Thus, an expression referring to the Customer’s invoices will return multiple values. In order to
display those values, some kind of aggregation has to be applied. The most common one is to sum up values:
sum(Invoice.Amount)

But there are other aggregations as well:

avg(Invoice.Amount) -- the average, ignoring empty field


cnt(Invoice.Amount) -- the count of non-empty fields
min(Invoice.Amount) -- the minimum value, ignoring empty fields
max(Invoice.Amount) -- the maximum value, ignoring empty fields
first(Invoice.Amount) -- the first value, according to Ninox' internal sorting
last(Invoice.Amount) -- the first value, according to Ninox' internal sorting
concat(Invoice.Amount) -- lists all values, separated by ", "

Logical Expressions

Logical expressions check if something is the case or not. Most often you’ll need them to create specific filter rules
or to make decisions within a calculation. A logical expression either returns true or false. The most common form
of a logical expression is a comparison of two values, like:

Amount > 100 -- greater than


Amount < 100 -- less than Amount >= 100 -- greater than or equal to
Amount <= 100 -- less than or equal to
Amount = 100 -- equal
Amount != 100 -- not equal

Logical expressions may be combined by and, or, not.

Age > 12 and Age < 18


Status = 1 or Status = 2 or Status = 3
not (Status = 4 or Status = 5)
Status != 4 and Status != 5

Note, the operator precedence is not -> and -> or.

Making Decisions

In the previous chapter you’ve learned about logical expressions. The result of such an expression may be used in
an if / then / else expression:

if Age < 18 then "Child" else "Grown-up" end

if Age < 18 then


if Age < 13 then "Child" else "Teenager"
else "Grown-up"
end

Please note, that the then and else part have to return values of the same data type. You can omit the else clause,
which returns a null or no operation (void) for the false portion of an if expression. Terminate the if-block with an
end statement.

Use switch case for short specific assignments with a default:


switch <expression> do
case <value>: <result value>
case <value2>: <result value2> ... default: <default value>
end

You can use any number of case statements, but their result values must all be the same data type and the
optional default statement must be the last option before end, when used. Result values can also contain multiple
instructions, such as assignments and calculations, as long as the returned value data types match each other.
Ninox will surround multiple instructions in parenthesis to group them together.

Filtering Values

In the chapter “Working with Table References” you’ve already learned how to access multiple values from a table
referring the current one — like sum(Invoice.Amount). With logical expressions, these results may also be filtered. A
72
Ninox User
Manual

filter expression has to be enclosed in braces:


sum((Invoice where Status = 2).Amount)
sum(Invoice[Status = 2].Amount)

This will only sum up the Invoice Amounts of Invoices with Status = 2.

You may also order by one field while returning another:


(select Invoice) order by Amount

This will return the id's of all Invoice records in the ascending order of Amount.
select Invoice[Status=2] order by Amount

Same but limiting the returned id's to a status of 2

Calling Functions

NX provides a range of built-in functions allowing you to transform values. A function call has the form:

function ( argument1, argument2, … )

Some examples:

age(Birthdate) -- The current age of a person with given Birthdate in years

cos(5) -- Cosinus of 5

Creating User defined functions locally with the function command:


function name(argument:data type,...)
do <script instructions> end

Note that a custom function can appear anywhere in a script, but they must come before any call to them,
including calling another custom function.

Using Variables

Sometimes it can be useful to store the result of a intermediate calculation and do further calculations based on
that result. Consider the case where you want to check the age of a person like:
if age(Birthdate) > 18 then "Grown-up"
else if age(Birthdate) > 12 then "Teenager"
else "Child"
end

Since age(Birthday) is used multiple times, things may be simplified with a variable which stores the result of the
age calculation:
let a := age(Birthdate);

if a > 18 then "Grown-up" else if a > 12 then "Teenager" else "Child" end

A variable is declared with a let statement:

let variable := expression;

Any expression following that let statement can make use of that variable.
var variable := expression

These variables can be modified afterwards, such as in loops.


let x := 1; ...; x := x + 1;
var y := 1; ...; y := y + 1;

Modifying Data

Some expressions in NX may also modify data. Up to the current release 1.5 of Ninox, this is only allowed for
trigger expressions (field option Trigger after update). While further enhancements are planned, modifying data is
currently restricted to change the value of record fields.

As an example, consider a table Article with a field Price (number) and another table Invoice Item with fields
Article (reference to table Article) and Price (number). After assigning the Article, Ninox shall copy the Article’s
Price to the Invoice Item’s Price. This can be achieved with a Trigger after update on Article containing following
expression:
Price := Article.Price

73
Ninox User
Manual

It is also possible, to update multiple fields, using a semicolon:

Price := Article.Price;
Description := Article.'Article No' + " " + Article.Name

Create Records

With the create statement it’s possible to create new records for a table. The following example creates a new
record for the table Person and stores a reference to that record in the variable p. It then assigns a Name to the
newly created Person.

let p := create Person;


p.Name := "Sarah Conner"

You can also duplicate a record to create a new one. "This" is an automatic handle to the current record.
duplicate(this)

Select Records

Typically, formulas will access data from related tables like descibed above (“Working with Table References”).
However, using the select statement there’s also a way to access data from an unrelated tables.
select Person

Will look up all Person records, this statement returns an array of record references.

select Person where ZIP="10000"

This statement selects only the Persons with the given ZIP value 10000.

Selecting records is useful in many situations, one common case is to calculate the next Invoice ID.

'Invoice ID' := max((select Invoices).'Invoice ID') + 1

Selecting records is useful in many situations, one common case is to calculate the next Invoice ID.

record(tableName, recordId)
record(tableName, recordId).fieldName

Use the record function to return the nth record id of a table as a handle.
Note that recordID is not a position in a sorted view. If a record has been deleted, using that recordID will return a
null, since the ID no longer exists and never will again.

Delete Records

With the delete command, it’s possible to remove one or more records. Be careful in combination with select,
because this may affect a wide range of records with a single call. Some examples:

delete first(select Person where 'First Name' like "Hans")

This will look up the first record from the Person table where the name contains "Hans" and remove it.
delete select Person where 'First Name' like "Hans"

This will look up the all records from the Person table where the name contains "Hans" and remove all matching
records.
delete select Person

Will remove any record in the person table.


delete Customer

When issued on an invoice record, this will remove the customer that is linked to the current invoice.
delete Invoices

When issued on a customer record, this will remove all invoices which are linked to the current customer.

Loops

The for statement can be used to loop over arrays of values – e.g. the result of a select.

for p in (select Person)


p.Haircolor := "red"

This exmple would lookup all Person records (select Person). For each record (stored in the variable p) it would
then change the Person‘s Haircolor to red.

74
Ninox User
Manual

Use the range(From, To) function to create counting loops:

for i in range(0, 10) do ... end

Please note, that for range(From, To), From in inclusive and To is exclusive. To state an example:
concat(range(0, 4))=> 0, 1, 2, 3
concat(for i in range(0, 4) do i*i end) => 0, 1, 4, 9

Similar to in range:
for i from <start> to <end> do ... end
for i from <start> to <end> step <step> do ... end

While loops test the condition at the beginning

while <expression is true> do ... end

Arrays

Some expressions will return arrays, that is lists of values, as a result. E. g. the reverse end of a relation will return
an array of record ids:
Costumer.Invoices => [ID1, ID2, ID3]

It is also possible to create an array explicitly with the following syntax:


let MyArray1 := [1, 2, 81];
let MyArray2 := [1, 2, 9 * 9];

Function Reference

Type Conversion

Number Functions

number(value)

Tries to interpret the given value as a number.

If value stems from a choice field, this will be the choice’s internal id. Use number(text(choice)) to get a
numeric representation of the choice’s text.
If value is a date, time or timestamp, this will be the the number of milliseconds between midnight of January
1, 1970 and the specified date.
If value is an appointment, it is treated like the appointment’s begin date.

| number("10") => 10
| number(5) => 5
number(now()) => 1531402014168

Mathematical Functions

round(x) – Rounds a number to the nearest integer.


round(x, digits) – Rounds a number with the given amount of digits.
| round(1.234, 2) => 1.23
| round(12345.987, -2) => 12300

floor(x) – Rounds a number DOWNWARDS to the nearest integer.

ceil(x) – Rounds a number UPWARDS to the nearest integer.

sqrt(x) – the square root of x.

sqr(x) – the square of x => x2

sign(x) – the signum of x:


| sign(-2.5) => -1
| sign(2.5) => 1
| sign(0) => 1

abs(x) – the absolute value of x


| abs(-5) = abs(5) = 5

sin(x) – Sinus of x (in radians)

cos(x) – Cosinus of x (in radians)

tan(x) – Tangens of x (in radians)


75
Ninox User
Manual

asin(x) – Arcus sinus of x (in radians)

acos(x) – Arcus cosinus of x (in radians)

atan(x) – Arcus tangens of x (in radians)

atan2(x) – Arcus tangens of x (in radians), squared

random() – A random number between 0 (incl.) and 1 (excl.)

pow(x, y) – x to the power of y: xy

exp(x) – x to the power of e => ex

log(x) – Logarithm of x to the base of 10.

log(x, y) – Logarithm of x to the base of y

ln(x) – Natural logarithm of x

odd(number) – true, if number is odd

even(number) – true, if a number is even

Text Functions

text(value)

Converts any value to a string representation possibly reflecting the format option of its field settings. If there’s no
value, the result will be the empty string: "".

| text("Hello") => "Hello"


| text(2.34) => "2.34"
| text(MyCurrencyField) => "1,234.56 $"
| text(today()) => "07/13/2018"

length(string) – Returns the string’s length (the number of characters)

trim(string) – Removes leading and trailing white-space of string

lower(string) – Converts a string to lower case

upper(string) – Converts a string to upper case

If the string’s length is smaller than the given length, the missing space is filled up with
lpad(string, length, padding) -
the given padding at the start of the string.

- If the string’s length is smaller than the given length, the missing space is filled up with
rpad(string, length, padding)
the given padding at the end of the string.

substring(string, start, end) – Extracts a part of the string. Start and end are zero-based.
| substring("Hello World!", 0, 5) => "Hello"
| substring("Hello World!", 6, 10) => "World"

substr(string, start, length) – Extracts a part of the string. Start is zero-based.


| substr("Hello World!", 0, 5) => "Hello"
| substr("Hello World!", 6, 5) => "World"

substr(string, start) – Extracts a part of the string. Start is zero-based.


| substr("Hello World!", 4) => "o World!"

contains(string, match) – Checks if string contains the given match string by exact comparison.
| contains("Hello World!", "World") => true
| contains("Hello World!", "world") => false

index(string, match) – Finds the start index of the given match string within string.
| index("Hello World!", "World") => 6
| index("Hello World!", "world") => -1 (not found)

replace(string, find, replace) – Replaces any occurance of find with replace.


| replace("Hello World", "l", "X") => "HeXXo WorXd"

replacex(string, pattern, flags, replace) –


Replaces occurances of pattern in string with replace. Pattern is a regular
expression string, flags is also a string specifying how the match takes place. Replace is a string, optionally using
argument expressions. This call is compatible to JavaScript’s string.

replace(new RegExp(pattern, flags), replace)

76
Ninox User
Manual

| replacex("Hello World", "l", "g", "X") => "HeXXo WorXd"

Learn more at: Javascript RegExp.

testx(string, regular_expression, flags) - boolean

testx(string, regular_expression) - boolean

extractx(string, regular_expression, flags, extract)


extractx(string, regular_expression, extract)
extractx(string, regular_expression)

extracts a substring from the given string

capitalize(string) - Capitalizes the first letter of each word

creates styled text elements. The icon is placed to the left of the text. Use "" for none, and
styled(text, colour, icon) -
the colour is the objects background
| styled("Attention", "red", "warn")

format(number, format mask) - Converts a number into a formatted text. Format mask elements:

- 0 represents a number or 0
- # represents a number that is displayed only, if the number is big enough
- period (.) represents the decimal separator (will be formatted according to the country, that means, in
the UK and US it is shown as a floating point)
- comma (,) represents the grouping separator (will be formatted according to the country, that means,
in the UK and US it is shown as a comma)

Examples:
| format(42.5, "0") => "42"
| format(42.5, "000") => "042"
| format(42.5, "000.00") => "042.50"
| format(42.5, "0.00") => "42.50"
| format(42.5, "#,##0.00") => "42.50"
| format(1042.5, "#,##0.00") => "1,042.50"

Arrays

sort(array) - sorts an array in ascending order


rsort(array) - sorts an array in descending order

item(array, index) - extracts a single item of an array, the index is zero based

slice(array, start, end) - extracts a sub-array. Start is zero based and both are position numbers.

sum(array)
avg(array)
first(array)
last(array)
min(array)
max(array)
cnt(array) or count(array)

Aggregates array items from an array and returns a single result

concat(array) - Returns a string result with ", " (comma space) separating each element

unique(array) - returns unique values of the array as an array


unique("item1","item2","item1","item3","item2") => ["item1","item2","item3"]

range(start, end)
range(start, end, step)
Returns an array of consecutive numbers from start to one minus end, by an optional step value or one. Start can
be higher than end, in which case they're numbered in reverse order.

split(string, separator) - Split a string into an array at each separator


splitx(string, regular expresion) - Split a string into an array by using a regular expression
| split("Hello World", " ") => ["Hello", "World"]
| splitx("Hello World", "\s") => ["Hello", "World"]

chosen(field) - Get all chosen values from a multiple choice field


chosen('multi choice field') => ["Option 1", "Option 2"]

Date Functions

date(year, month, day) – Returns a date value


| date(2018, 6, 15) => 15.06.2018

77
Ninox User
Manual

– Converts a number to a date value. The number represents the number of milliseconds since the
date(number)
UNIX epoch ( 00:00:00 UTC on 1 January 1970)

date(datetime) – Converts a timestamp data type to a date value (leaving out the time value).

year(date) – Full year of the given date


year(datetime) – Full year of the given date+time value
year(appointment) – Full year of the start date of an given appointment.

month(date) – Month of the given date (1 = January, … 12 = December)


month(datetime) – Month of the given timestamp
month(appointment) – Month of the start date of a given appointment
monthName(number) – Name of the given month number
| monthName(1) => “January”
monthIndex(text) – Number of the given month name
| monthIndex(“January”) => 1

day(date) – Day of month of the given date (between 1 and 31)


day(datetime) – Day of month of the given date+time value
day(appointment) – Day of month of the start date of the given appointment

weekday(date) – Weekday of the given date (0 = Monday, 1 = Tuesday, … 6 = Sunday)


weekday(datetime) – Weekday of the given date+time value
weekday(appointment) – Weekday of the start date of the given appointment
weekdayName(number) – Name of the given weekday number
| weekdayName(6) => “Sunday”
weekdayIndex(text) – Number value of the given weekday name
| weekdayIndex(“Sunday”) => 6

today() – the current date (without time)

now() – the current timestamp

age(date) – Number of full year’s between now and the given date (e.g. a person’s age)

format(date, format)
format(datetime, format)
format(appointment, format)
| format(timefield, "hh:mm") => "10:30"
| format(datetime, "DD.MM.YYYY, hh:mm") => "13.11.2018, 16:45"

Formats a date as a string. The format expression is a string which may contain following tokens (example for
15th of July 2018, 01:02:03 am):

Token Description Example


YY two digit year 18
YYYY four digit year 2018
M one or two digit month 6
Mo month ordinal 6th
MM two digit month 6
MMM three character month name Jun
MMMM full month name June
D one or two digit day 15
Do ordinal day 15th
DD two digit day 15
d day of week as number (0-6) 6
do ordinal day of week 6th
dd three character weekday Fri
name
three character weekday
ddd Fri.
name
dddd full weekday name Friday
e or E seems to be same as “d” 6
l lowercase “L” - M/D/YYYY 6/15/2018
L MM/DD/YYYY 06/15/2018
w or W week number of year 24
Q quarter of year 2
one or two digit hour (12
h 1
hours)
78
Ninox User
Manual

Token Description Example


hh two digit hour (12 hours) 01
one or two digit hour (24
H 9
hours)
HH two digit hour (24 hours) 13
m one or two digit minute 2
mm two digit minute 2
s one or two digit second 3
ss two digit second 3
a am or pm am
x milliseconds from Unix epoch 1529017320000
X seconds from Unix epoch 1529017320
Z timezone offset from UTC -04:00:00

yearmonth(date)
yearmonth(datetime)
yearmonth(appointment)

Year and month of a date as a string, e.g. "2018/08". Useful for grouping records per month.

yearquater(date)
yearquater(datetime)
yearquater(appointment)

Year and quarter of a date as a string, e.g. "2018/03". Useful for grouping records per quarter.
yearweek(date)
yearweek(datetime)
yearweek(appointment)

Year and week of year of a date as a string, e.g. "2018/32". Useful for grouping records per calendar week.

week(date)
week(datetime)
week(appointment)

Calendar week of a date as a number.

start(appointment) – Start timestamp of an appointment.

endof(appointment) – End timestamp of an appointment.

duration(appointment) – Duration of an appointment in milliseconds.

days(start, end) – Number of days between two dates.

– Number of working days between two dates. This function does consider any Monday to Friday
workdays(start, end)
to be working days, it does not respect holidays.

time(number) – converts a number value (milliseconds) to a time value.


time(hours, minutes)
time(hours, minutes, seconds)
time(hours, minutes, seconds, millis)

Returns a time value with given hours, minutes, seconds and milliseconds.

datetime(year, month, day)


datetime(year, month, day, hour)
datetime(year, month, day, hour, minute)
datetime(year, month, day, hour, minute, second)
datetime(year, month, day, hour, minute, second, millis)

Returns a timestamp value with given year, month, date, hour, minute, second and millisecond.

datetime(date) – converts a date value to a date+time value, time is set to 00:00.

datetime(date, time) – converts a date and a time value to a timestamp value.

– converts a number value,representing the number of milliseconds since the UNIX epoch, to a
datetime(number)
timestamp data type.

_cd - returns the creation timestamp of the current record. Doesn’t appear to work in the Mac app.

_md- returns the modification timestamp of the current record. Doesn’t appear to work consistently in the Mac
app.
79
Ninox User
Manual

timeinterval(number) – converts a number (milliseconds) to a timeinterval value.

timeinterval(time) – converts a time value to a timeinterval value.

appointment(timestamp, timestamp) - converts timestamp data type to an appointment data type

appointment(timestamp, duration) - combines a timestamp and a duration data type into an appointment data type

Create specific calendar events:


createCalendarEvent(calendar, title, from, to)
createCalendarEvent(calendar, title, appointment)
createCalendarEvent(title, from, to)
createCalendarEvent(title, appointment)
createCalendarEvent(calendar, title, from, to)
createCalendarReminder(calendar, title, start, due)
createCalendarReminder(calendar, title, start)
createCalendarReminder(calendar, title)
createCalendarReminder(title, start, due)
createCalendarReminder(title, start)
createCalendarReminder(title)

createCalendarReminder(calendarName, title, from, to) - Create a calendar event in Apple's calendar app

Color Functions

color(text) – converts a text to a color value


| color("red")
| color("#f00")
| color("ff0000")
| color("rgb(255,0,0)")

color accepts any valid HTML/CSS color identifier.

color(red, green, blue) – creates a color value from rgb-components. red, green and blue a numbers between 0 and
255.

– creates a color value from rgb- and alpha-components. red, green and blue a numbers
color(red, green, blue, alpha)
between 0 and 255, alpha is between 0 and 1.

color(choice) – returns the color of a choice value.

Icon Functions

icon(name) – returns an icon, e.g. icon(“warn”)

icon(choice) – returns the icon of a choice value

A full list of all icons and its corresponding names can be found here in our Ninos Icon-set database.

Location Functions

longitude(Location) – the longitude value of a location field

latitude(Location) – the latitude value of a location field

location(title, latitude, longitude) – creates a location value with given title (text), latitude (number) and longitude (number).

User Interface Automation

User interface automation has been added with Ninox 1.7.0. It’s not yet available for Ninox Server and Cloud.

printRecord(recordId, layoutName) - Creates a PDF from the given record and print layout name.
| printRecord(record(Invoices, 1), "My Invoice Template")

openPrintLayout(recordId, layoutName) - opens the print layout editor


| openPrintLayout(record(Invoices, 1), "My Invoice Template")

openRecord(recordId) - opens the record and jumps to the related table


| openRecord(record(Invoices, 1))

popupRecord(recordId) - opens the record in a popup form without switching to another table
| popupRecord(record(Invoices, 1))

openTable(tableName, viewName) - opens a table view


| openTable("Invoices", "All Invoices")

closeRecord() - closes the top-most record form

closeAllRecords() - closes all record forms

80
Ninox User
Manual

- Pop up a message box with an "OK" button. This requester only appears after the script is completed,
alert(string)
and with the latest message assigned before the script ended.
| alert("Hello Ninox User!")

User Management Functions

Please note that the following functions do only work for Ninox Server and Cloud installations. They won’t return
useful results for Ninox App.

user() – returns the current user value

userId(id) – returns the user value with given id

userId() – returns the id of the current user.

userId(user) – returns the id of the given user value.

userName() – returns the name of the current user.

userName(user) – returns the name of the given user value.

userFirstName() – first name of the current user

userFirstName(user) – first name of the given user value

userLastName() – last name of the current user

userLastName(user) – last name of the given user value

userFullName() – full name of the current user

userFullName(user) – full name of the given user value

userEmail() – email address of the current user

userEmail(user) – email address of the given user value

userHasRole(string) – returns true, if the current user has the specified role

userRole(user) – Get a user's role: string

users() – an array of all users: [user]

Functions to send e-mails **

sendEmail({
from: "recipient@domain.com",
to: "recipient@domain.com",
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>"
})

Importing functions

importFile(this, "https://static.ninoxdb.de/images/logo-ninox-new-2@2x.png")

- import a file from an URL and save it as an attachment of a data record

importFile(this, printAndSaveRecord(this, "My Print Layout"), "mypdf.pdf")

- export one of your print layouts as PDF and save it as an attachment of the data record

Other Functions

alert("This is the alert message") - will show a message/an alert with the message "This is the alert message"

barcodeScan() - activate the bar code scanner

dialog("Title", "Message", ["Option A", "Option B"]) - opens a dialog for the user
| let result := dialog("Title", "Message", ["Option A", "Option B"]);
if result = "Option A" then
alert("Good choice")
else alert("Great")
end

81
Ninox User
Manual

do as server <script> end - Ensure server-side execution of script

- shows all the attachments in a field, please be aware that the function gives an array. Use an additional
files(this)
function like concat(), first(), last() etc.

file(this, "mypdf.pdf") - gives aa specific file

html(text) - Returns a rich text representation of a text.

http(method, url, header, body) - Call REST services

ninoxApp() - returns one of "mac" | "ipad" | "iphone" | "web", identifying the type of app

openURL(string) - opens the web browser

raw(value) – returns the internal / raw representation of a value as a text

urlEncode(string) - adds percent encodings to a string

urlDecode(string) - removes percent encoding from a string

_________

** (only available in Ninox Cloud/Ninox Server teams)

82
Ninox User
Manual

7. Import and Export


7.1. Import Data
Ninox supports the import of CSV files as well as Bento templates.

Section 1: CSV File Import


Section 2: Bento Template Import

CSV File Import

A CSV file is a simple text file where each line represents one row and the columns are separated by comma,
semicolon or another character in each line. The most frequent and popular spreadsheet programs and databases
allow to create that kind of file.

You can either import data into an already existing table or create a new one from that data. If you choose to
import into an existing one, you can freely assign which column of the CSV file goes to which column of your table
definition. Ninox tries its best to make an automatic match by comparing column names – but you can modify
that manually.

You can start the import process in two different ways:

Open with Ninox: Open the file you want to import inside another app (e.g. Mail) with Ninox. If Ninox hasn’t
been started or no database has been opened, the firs thing Ninox does is ask you into which database to
import. Then the import assistant opens.
Import from Dropbox: Use the tab ‘Import data’ on the Database homepage (administration mode must be
activated). Here you can import data from your Dropbox assuming the Dropbox app is installed on your
device (if not, you will be prompted to install it).

Hint: If you want to import higher data volumes (10,000 rows and more), we recommend using Dropbox. Some
apps have difficulties with bigger CSV files and will cancel the process leaving you without the ‘Open with Ninox’
operation.

The Import assistant

a) Choose the character set.

b) Define whether the first line of the CSV file contains column headers / labels. Ninox will try to relate the labels it
finds to the correct columns automatically. You still can change the assignments manually, see below.

c) Define the separating character used in the CSV file (e.g. comma).

83
Ninox User
Manual

d) Select how to quote text.

e) Select from different number formats.

f) Choose the table you want to import the data into.

g) You can choose, if

all data will be imported,


only new data records will be added (see Duplicates and keys below),
only existing data records will be updated.

h) If a key field can’t be assigned unambigously, Ninox gives you two options (see Duplicates and keys):

ignore those data records,


update all found data records.

a) All columns found in the CSV file are listed and can be assigned to one data field of the selected table.

b) Provided that Ninox finds corresponding field names / column headers, the data fields are related
automatically. You can change these assignments using drag & drop: drag a data field away from the assignment
to remove it.

c) Usually the data from the CSV file will be transfered to the data fields (update all). However, you can determine
that a field is completed only, if it doesn’t have any data (update only empty fields). if you define a field as key,
Ninox will compare the table data with the CSV file and update those records where the key fields correspond (see
Duplicates and keys below).

d) Lists all fields of the selected table that has not been assigned yet..

e) Drag a data field from a list to an empty place holder to assign this field to the corresponding column of the
CSV file.

f) Prepares the import and shows a preview of the results. It requires your confirmation to put into effect those
modifications.

Import preview

Before the import process is put into effect, Ninox shows you a preview of the results.

84
Ninox User
Manual

a) This previews the data changes.

b) Navigate page by page through the import preview.

c) The table shows the planned modifications. The first column indicates, whether a data record is created (new)
or an existing one is updated (record ID). Values that are going to be updated are shown blue, those that stay the
same are black.

d) Confirm the import.

Duplicates and keys

By default, Ninox will create a new record for each line of the CSV file. Sometimes it can make sense, though, to
update existing records.

In that case, you must define a key field, so that Ninox can detect which records are going to be updated. Select
‘Key’ for this field instead of ‘Update all’. Key fields must be unique, that is, there must not be two data records in
the table / CSV file where this field has the same value. It is possible to define more than one key field to assure
unambiguity (e.g. ‘first name’ and ‘last name’ of one person).

If a key is defined, Ninox searches for each record in the CSV file for the corresponding record in the table where
the keys match. Then the other fields of the matching records are updated.

If no corresponding data record can be found, Ninox creates a new one.

Bento Template Import

In order to migrate your data from Bento to Ninox, you’ll need the BentoToNinox converter.

You can download it for free from the following link:

https://ninoxdb.de/ninox/downloads/BentoToNinox.dmg/

Step 1: Export a Bento Library as a Bento Template

Start Bento
Choose a library
Click on File => Export…
Choose “Template”
Check any item in the list “Include these related libraries”
Also, check the “Include records in template” option
Click on “Next” to save everything in a “.bentoTemplate” file

Step 2: Convert the Bento Template to a Ninox Archive


85
Ninox User
Manual

Start BentoToNinox.app
Choose the “.bentoTemplate” file
A “.ninox” file will be created in the same directory

Step 3: Import the Ninox Archive

Double-click on the “.ninox” file to import it into Ninox


If you want to import it on your iPad:
Send the file by email to your own account
Open Mail on your iPad
Select the mail
Tap on the file
Tap on “Open in Ninox”

Limitations

BentoToNinox will migrate you data with an best-effort approach.

It supports tables (libraries), fields, table relations (related data) as well as media files.

However, some things won’t be migrated:

Adress Book
Collections / smart collections: Make use of Ninox’ table view features to recreate your collections.
Form layouts: Due to Ninox’ different approach to forms, layout information cannot be migrated. Ninox will
generate automatic layouts but you may have to rework these.
Some field otpions like number format: You can easily fix that within Ninox afterwards.
Calculations: You’d need to recreate calculated fields in Ninox
Contact list fields: Address, Phone Number, Email Address, URL, IM Account

If you experience any problem with conversion of your data,

please contact us: support@ninoxdb.de.

86
Ninox User
Manual

7.2. Importing Linked Data


This chapter shows how linked data can be imported into related tables.

Foreword

Ninox builds table links solely based on the Ninox-own keys. As a key Ninox uses the No. column. The values of
this column are assigned automatically and can not be changed. It is therefore not possible to change this column
during the import.

Suppose you link a table “Invoices” to another table “Customers”. Then Ninox creates in the background in the
table “Invoices” a field for the No. of customer.

Note, if you have previous experience with other databases: SQL, this would be equal roughly to ALTER TABLE
“Invoices” ADD COLUMN “Customers” FOREIGN KEY REFERENCES customer (No).

To fill properly Invoices.Customer when importing this field, you need to give to the Import Wizard information
enabling Ninox to identify the right customer to build up the relation.

Method

The procedure to import relational data is illustrated by the example Invoices => customers. “Customers” is the
main table and “Invoices” the detail table. (A customer can have multiple invoices.)

Overview:

1. Preparing the data to be imported


2. Creating the tables in Ninox
3. Import in the main table
4. Import into the detail table

1. Preparing the data to be imported

The data must be in two csv files with the following exemplary structure:

customers.csv — customer No.; first name; surname

Invoices.csv — customer No.; invoice number; date; amount

It is important that there is a common key field – in this case, the customer number. The other fields are for
illustration only.

2. Creating the tables in Ninox

Create analogous to CSV files two tables in Ninox:

Customer

Customer No (text)
First name (text)
Name (Text)

Invoices

Customer No (reference to the Customer table)


Invoice number (text)
Date (date)
Amount (number)

Note that the table “Invoices” doesn’t have a field for the customer number, instead a link to the Customers table.

3. Import into the main table

Import the Customers.csv without special settings into the customers table.

4. Import into the detail table

Import the Invoices.csv into the invoices table.

87
Ninox User
Manual

In the field assignment, you specify the following:

[Customer No] — [customers (customer number)] (update all)

Through this assignment, you tell the Import Wizards- to look up the customer number from the Invoices.csv in the
customer table to associate the right customers.

88
Ninox User
Manual

89
Ninox User
Manual

7.3. Import Data from Bento


Bento Template Import

In order to migrate your data from Bento to Ninox, you’ll need the BentoToNinox converter. You can download it
for free from the following link:

https://ninoxdb.de/ninox/downloads/BentoToNinox.dmg

Step 1: Export a Bento Library as a Bento Template

Start Bento
Choose a library
Click on File => Export…
Choose “Template”
Check any item in the list “Include these related libraries”
Also, check the “Include records in template” option
Click on “Next” to save everything in a “.bentoTemplate” file

Step 2: Convert the Bento Template to a Ninox Archive

Start BentoToNinox.app
Choose the “.bentoTemplate” file
A “.ninox” file will be created in the same directory

Step 3: Import the Ninox Archive

Double-click on the “.ninox” file to import it into Ninox


If you want to import it on your iPad:
Send the file by email to your own account
Open Mail on your iPad
Select the mail
Tap on the file
Tap on “Open in Ninox”

Limitations

BentoToNinox will migrate your data with a best-effort approach. It supports tables (libraries), fields, table
relations (related data) as well as media files. However, some things won’t be migrated:

Adress Book
Collections / smart collections: Make use of Ninox’ table view features to recreate your collections.
Form layouts: Due to Ninox’ different approach to forms, layout information cannot be migrated. Ninox will
generate automatic layouts but you may have to rework these.
Some field otpions like number format: You can easily fix that within Ninox afterwards.
Calculations: You’d need to recreate calculated fields in Ninox
Contact list fields: Address, Phone Number, Email Address, URL, IM Account

If you experience any problem with conversion of your data,

please contact us: support@ninoxdb.de.

90
Ninox User
Manual

7.4. Export Data


You can either export an entire database or single tabels. Ninox supports data export to the following file formats:

.xlsx Microsoft Excel 2007 and later.


.csv CSV files (coma-separated values) with several output format options.
.ninox Ninox Database archive format.

Exporting Tables or Data Views

In Ninox you can call the “Data Export” function in two places.

From the database homepage you can export one or multiple tables in raw form – that means the entire table with
all fields and values.

Exporting from the data view, means that filters, groupings and additional columns will be exported as well. Thus,
you export what you see.

Exporting Tables from the database homepage

Open the database homepage. And then click Database Export. In the next dialog you can choose between CSV
and Excel export.

CSV Export

Choose which table you want to export. From the database home page, you can export tables in raw format. That
means that the contents of the every field of the table will be copied. Sorting, groupings and computed columns
will not be adopted. To insert calculated columns Insert a field into the table with a function instead or use mass
data changes to add a field with the desired values.

Excel Export

In order to convert tables in the typical xlsx Microsoft Excel format click on the tab “Excel Export”. Select the
tables to be exported.

Exporting from the data view

Exporting a table view gives you more control over the generated data. The export will include any visible column
and respect sorting and filtering as well. Thus you can also export calculated data.

If you export from the data view you only export the columns that are visible in the data view. The output file will
also contain sorting, filters, grouping and calculated columns. Open the data view of the table to be exported.
Click on the tab of the data view and select “Export Data”.

91
Ninox User
Manual

This opens the Export dialog. Here you can also choose between Export CSV Export and Excel.

Export Options

For export to the Excel format, there are no other options.

CSV Export Options

92
Ninox User
Manual

1. By default, the header is included in the export, select “No” to skip the header.

2. Activate separator definition when you want to output a field with the separator definition at the beginning of
the CSV table.

3. This option is only available when you export via the data view. Put ”footer” to Yes to outputting a footer. The
footer can display values such as count, first, last, or a list of various values. For number fields are in addition
sum, average, minimum or maximum available.

4. Choose as separator:

Tabulator
93
Ninox User
Manual

5. Define how to mark text:

"

'

6. newline:

CRLF is the standard for Windows and Mac OS


LF is used under UNIX

7. Select the number format or adopt the number format of the field settings.

8. The options "Locale", "ISO 8601", "GMT" and UNIX timestamp" are available for the date format.

9. For the charset “UTF-8 (Unicode) is set by default. There are numerous other options available.

Export Entire Database

You can back up databases as an archive. Ninox uses its proper data archive format (.ninox).

Database archives can be imported with all versions Ninox (iPad, Mac, iPhone, Ninox Pro and Ninox cloud).

On the Ninox Startpage click the Menu button of your database and “save as Archive”.

On the database home page, click the Menu button in the top left and choose “Save As Archive”.

94
Ninox User
Manual

7.5. Import attachments


This chapter shows how to import attachments. This feature is useful to attach many files in one swoop into a
table.

Besides data fields, also files can be attached to records.

With the Ninox Admin Tool you can add many attachments at once to a table. This requires a consistent naming of
the files to be attached.

Procedure

1. Download Ninox Admin Tool and start it from your download folder.

Mac Download(If necessary, change your security settings for the program: System Settings => Security.)
Windows Download

2. Prepare files

Create a folder where you put the files to be attached. Maintain a consistent naming of the individual files.

3. Prepare Table

Put in the table of their database, a column that contains the names of files to be uploaded.

4. Save as “Archive”

Save your database as a Ninox file. Just click on the home page of your database on the menu button in the top
left and choose “Save As Archive”.

95
Ninox User
Manual

Select a name in the following dialog and confirm.

5. Open the file with the Ninox Admintool

a. Now switch back to the Admin Tool. Click “Open Database” and select the Ninox file.

b. Choose the table to which you want to attach your file.

c. Choose in “Key Field” the column that contains the names of files to be uploaded.

d. Click on “Import Directory” and choose the folder containing the files.

e. In the next dialog you will see the assignments of files to their table.

f. Click “Import Files”.

g. Now save the database with the imported files by clicking on “Save Database”.

h. Select a new name for your database and then save the Ninox file.

6. Open the new Ninox file by double-clicking to import them back into Ninox.

96
Ninox User
Manual

8. Print
8.1. Print
Ninox supports printing by creating a PDF or HTML representation of a table view or a single record. You can use
the print feature to create customized reports or generate invoices for example.

97
Ninox User
Manual

8.2. Print tables

For printing your table you need to select the following Button :

Ninox exports your current view as a .pdf-file which is now ready to print. If you wouldn't like to receive all your
columns you easily can hide them and afterwards they are not going to be printed.

Optional it is possbile to receive a .html-file or to change the font size via the following path: Please activate the
Administration mode in the top right corner. Subsequent you need to go to the overview of your project. After
selecting Options in the menu bar you can adjust the font size and decide whether you would like to export a
.pdf- oder .html-file.

98
Ninox User
Manual

8.3. Print formular

Please select the printer symbol to print your formular.

In comparison to printing tables there are several more options to adjust your printing procedure. As an example
you can decide if you would like to print all your forms generated in the background or just the currently displayed
record.

On the right edge you can configure the page dimensions like the paper format, the head/foot and the page
margins. In addition you can decide if you would like to print attached images or not.

For editing fields you need to click on them to activate more options on the right frame. Depending on your values
it can be useful to select Auto or Fixed height. If there are huge values and you choose Auto the height of the field
will increase. Selecting Fixed height causes to no variation of the height.

Some standard settings are display below: Background and font colour, frame, font type and size, line pitch and
the orientation of your formular.

99
Ninox User
Manual

8.4. Add Elements


Optionally, static images can be included – for example logos. There are also more options to customize your print
layout. You can add Text and move it. You can also add fields from your table or related tables. It is also possible
to use formulas.

100
Ninox User
Manual

8.5. Use Ninox Language to add fields


Following we would like to show you more opportunities to fit your printing page. We would like to explain the
feature to you with an example. The initial position is a table with the vollowing values:

You need to click on the row which you would like to print in your table, afterwords please switch to the Print

formular task bar via the the following button:

As a result you should receive a sheet including these information. As shown above, you can create, shift and
delete fields.

In this case it would be an idea to multiply the value of Current discount by the value of Price. It would be
meaningful to create a new field name Price with discount and another one where the result should be
displayed. To start your calculation, you need to double-click on the result field.

If you click on the Settings button a new window opens and we can move to Calculate to enter our code.

Via drag & drop it is possible to draw the necessary items to editing field in the Visual mode. One example how
the problem could be solved:

101
Ninox User
Manual

If you prefer entering your code yourself and not via drag & drop, please change to the Text mode. The same
calculation would look like this:

All in all the final result should look like this:

Now you can decide if you just would like to print the current sheet or all lines of the table. For more information,
please go to the Print formular paragraph.

102
Ninox User
Manual

9. System-Requirements
9.1. System-Requirements
Ninox for Mac

4 GB RAM

Intel CPU

Sufficient free disk space (Ninox.app uses about 50 MB)

macOS at least 10.10 Yosemite

Ninox for iPad

iOS 8 or later

Sufficient free disk space (Ninox.app uses about 50 MB)

Ninox for iPhone

iOS 8 or later

Sufficient free disk space (Ninox.app uses about 50 MB)

Ninox Android

Android Kitkat (4.4) or later

Ninox Cloud

Windows: Supported by Google Chrome, Edge, Firefox browsers and Internet Explorer 11 or later

Mac: Latest version of Safari on OS X 10.9, 10.10, 10.11 or later

iPad: iOS 8, 9 or later

iPhone: iOS 8, 9 or later

Android: Kitkat (4.4) or later

103
Ninox User
Manual

10. User management, identities and rights


10.1. User management, identities and rights
User management

Ninox is a great solution for challenging tasks which needs to be done in a group. You can invite people to your
team to work together on a project. Please select Invite in the main menu and enter the Email adress of your
colleague. There are two options for given access rights:

admin: The admin is allowed to create new databases, to change the data model and to manage the users.If
you create a new team, you are the owner and automatically the admin. To order new subscriptions, you
need to be the owner of the team.
editor: As an editor you can edit the database, furthermore you are allowed to delete databases.

There is also the choice of Create new role. You can enter a description for this new role. If there are no
restrictions for any field, the new role owns every right. If you restrict any field during the further procedure, the
new restriction is also valid for your newly created role.

The settings described above are useful to make global and general decisions. If you would like to specify your
settings, you can manage the user rights for every single table and for every data attribute.

Define rules for single tables

To manage rights for your team members, you need to activate the Administration Mode in the top right
corner.

Please select the table for which you would like to define permissions. Please click on the table an select Edit
fields from the menu. There are four different options which you can manage:

If you don't select any field, everyone is allowed to take action. It is possible to select one, several or all
checkmarks - there are no restrictions.

You learned how to organize constant rules, but you also can make it dependent on changing conditions. This
option is available for the

104
Ninox User
Manual

Readable if and Writable if fields. You need to click on them and then you can enter your conditions.

An example:

If you enter the following code on the Readable if window, only the user who created the table is allowed to read
the content of the table.

_cu = user()

Define rules for single attributes

Similar to the topic above, you need to activate the Administration Mode and to click on the table in which you
would like to change the permissions. Select Edit fields again. Afterwords you can click on the Field which needs
to be configured.

Tick More options and thereafter you can set your preferences. It is possible to restrict to read and to write a
field of the table.

105
Ninox User
Manual

11. Data synchronization


11.1. Data synchronization
Especially for mobile users with different devices data synchronization is a significance tool while using Ninox. You
can use your data on several devices at different places. For the synchronization model you can choose between
iCloud and Ninox Cloud.

106
Ninox User
Manual

11.2. iCloud
Using iCloud you can keep your data up to date on endless devices. Therefore it is very important to always use
the same Apple-ID. Otherwise we can't ensure that your data are synchronous on every device.

Ninox for Mac, iPad and iPhone supports data synchronization with Apple iCloud.

In order to sync a Ninox database with iCloud, the following prerequisites are required:

iPhones and iPads need to run at least iOS 8.Macs need to run at least OS X 10.10 Yosemite.(There’s one
exception to this rule: OS X 10.9 can be synced with iOS 7)
Settings => iCloud: Each device needs to be logged in to iCloud with the same Apple ID.It is not possible, to
sync data across different iCloud accounts.That’s an intrinsic limitation of iCloud.
Settings => iCloud => iCloud Drive needs to be active.
Settings => iCloud => iCloud Drive => Ninox needs to be active.

When you create a new database, Ninox will ask if it should be stored locally or on iCloud. This setting cannot be
changed afterwards. You can tell an iCloud database by the small cloud symbol in its name.

If you want to share an existing local database on iCloud, you need to create a copy of it:

Open the database menu (top left corner on Mac/iPad; swipe database to the right on the start screen of
Ninox for iPhone)
Choose Duplicate database
Store the copy on iCloud.

Troubleshooting

iCloud may take some time to propagate changes from one device to another. How long it takes, depends on
many factors – to name a few: Internet connection, iCloud availability, size of the modifications.

If your database does not occur on the other device:

1. Thoroughly check the prerequisites mentioned above.


2. Check your Internet connection.
3. If possible, check if iCloud Drive is working for other apps like Pages. (If not, call Apple support.)
4. Give iCloud some time to propagate changes.
5. If it still does not work: Log off from iCloud, restart your device, log on again.

107
Ninox User
Manual

12. Data backup


12.1. Data backup
Ninox Cloud

Ninox Cloud automatically creates a backup of your databases every day. These data is going to be saved for 14
days. If you need to restore them, please contact our support via support@ninoxdb.de.

However it is possible to manually create backups which can make much sense: Sometimes you would like to test
out something new and you are not sure about the consequences. In the main overview of your databases you can
click on the arrow close to your database and select Create backup:

The backup gets the same name than your original database. Also the information who created the database at
which thime is displayed in the backup menu.

Please click on this item to get an overview of all your stored backups. You can download, delete and of course
restore them. The original version is never going to be overwritten. Instead of this, always another version is going
to be displayed with the ending (Restore) in the name of the database.

Local backup

Using a Mac, creating automatized backups is very easy with Time Machine. You also can save every single
database as an archive manually. Therefore you need to click on Save archive.

To reuse saved archives please select Import archive.

Ninox also supports the data backup via iCloud. The procedure is identical with the local backup.

108
Ninox User
Manual

13. API
13.1. Get started
Ninox provides powerful APIs to enable integration of Ninox with other services. The Ninox API requires a Ninox
Cloud account, it will only work for Ninox Cloud databases.

There are three main ways to use the API.

1. Zapier: With Zapier it's possible to connect Ninox with other popular services on the Internet just by drag &
drop.
2. Ninox REST API: Other services can connect to Ninox by calling the Ninox REST API.
3. Ninox REST Calls: Connect from Ninox to other services using built-in functions to call HTTP services.

Obtain an API Key


In order to use the Ninox API, you'll need an API Key. The API Key is a secret that is included in every HTTP request
to the Ninox API. Make sure to handle the key with care - it gives read and write access to all your databases.

Note: Do not include the key in client-side code. Attackers will be able to get access to the token, if it is included
in any code that is executed at the client/web browser.

1. Go to https://user.ninoxdb.de and sign in with your user email.


2. Click on </> API.
3. Click on Create API Key.
4. Copy the API Key to the clipboard.

109
Ninox User
Manual

13.2. Ninox REST API


HTTP REST / JSON is the most common interface technology these days. Ninox provides REST interfaces to read
and update data.

We recommend that you use a suitable tool to send HTTP requests. Postman is a good start:
https://www.getpostman.com. On Linux and macOS you can also use the curl command to issue requests from the
shell/terminal.

Authentication
In order to authenticate API requests, you need to provide the API Key as an HTTP Authorization header. The
format is:

Authorization: Bearer API-Key

Content-Type
NX assumes that services will provide their response as a valid JSON object. The services need to provide a
Content-Type header with the value "application/json". When calling the Ninox API or sending data to other
services you need to explicitly set this header in the http function, see below.
Content-Type: application/json

Get Teams
To get data from Ninox, the first step is to find the right team id. Use this request to list all your teams.

Request
GET https://api.ninoxdb.de/v1/teams

Response
[{
"id": "67mm9vc324bM7x",
"name": "Test-Team"
}]

Get Databases
The next step is to find the databases. With the following request you get a list of all databases within a team.

Request
GET https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases

Response
[{
"id": "nk5xt24oixj4",
"name": "Invoices"
}]

Get Tables
Now, you can list all available tables in that database.

Request
GET https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables

Response
[{
"id": "A",
"name": "Customer",
"fields": [{
"id": "A",
"name": "First Name",
"type": "string"
},{
"id": "B",
"name": "Last Name",
"type": "string"
}]
}]

The body does not only list all available tables but also the table definitions. Each item consists of three
properties: id, name and fields. The id is the table's id that you'll need to provide in order to get, update or delete

110
Ninox User
Manual

records. The name is the user-friendly table name. Fields is an array of objects, each describing a column in the
table. Each field is defined by an id, a user-friendly name and a type. See chapter "Table Definitions" for more
information

Get Records
This request returns all records of the specified table. The result set is limited, though - see below.

Request
GET https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables/A/records

Response

[{
"id": 1,
"sequence": 417,
"createdAt": "2018-06-13T12:16:32",
"createdBy": "ekL2xSxuD7jtN2F2D",
"modifiedAt": "2018-06-15T16:05:07",
"modifiedBy": "ekL2xSxuD7jtN2F2D",
"fields": {
"First Name": "Erica",
"Last Name": "Young"
}
}]

The response consists of an array of records. Each record has the following common attributes:

Attribute Type Description


id integer The record id, starting from 1
sequence integer The database change sequence number, when this record was last updated
createdAt string The UTC timestamp when the record has been created as YYYY-MM-DDThh:mm:ss
createdBy string The id of the user who created the record
modifiedAt string The UTC timestamp when the record has been updated as YYYY-MM-DDThh:mm:ss
modifiedBy string The id of the user who updated the record
An object of all data fields, the field name is used as the key, see chapter "Table Definitions"
fields object
for the value types.

Query Parameters

There are a few query parameters to control which and the amount of records to return:

Parameter Type Default Example Description


page integer 0 12 Result set page
perPage integer 100 250 Records per page
First
order string The field name to order the result
Name
desc boolean false true Order descending
new boolean false true Show newest records first (cannot be combined with order)
updated boolean false true Show latest updates first (cannot be combined with order)
sinceId integer 42 Show only records with a higher ID
Show only records that are created or updated after the specified
sinceSq integer 1567
database change sequence number

Example Request
GET https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables/A/records?page=2&perPage=5&order=First%20Name

Get a single Record


If you do know the record id of the record you're interested in, use this request.

Request
GET https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables/A/records/1

Response
{
"id": 1,
"sequence": 417,
"createdAt": "2018-06-13T12:16:32",
"createdBy": "ekL2xSxuD7jtN2F2D",
"modifiedAt": "2018-06-15T16:05:07",
"modifiedBy": "ekL2xSxuD7jtN2F2D",
111
Ninox User
Manual

"fields": {
"First Name": "Erica",
"Last Name": "Young"
}
}

Lookup a single Record


If you want to get a record based on some data of record known to you then use this request.

Tip : If you already have the record id of the record you're interested in then use the Get a single Record request
as that will be more efficient.

Request
POST https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables/A/record

Note : The endpoint is record and not records.

Body
{
"B": "support@ninoxdb.de",
"C": true
}

Response

{
"id": 1,
"sequence": 19,
"createdAt": "2018-09-06T12:21:04",
"createdBy": "admin",
"modifiedAt": "2018-10-08T17:15:52",
"modifiedBy": "admin",
"fields": {
"Name": "Ninox Support",
"Email": "support@ninoxdb.de",
"Has Replied?": true
}
}

Tip : B and C in request body are field ids/column ids for the fields Email and Has Replied ? respectively. Issue a
request to fetch the target table to know which field map to what id.

Update Records
Multiple records can be updated and/or created with a single request. The request body must contain an array of
all records to create or update.

To update a record: Specify the record's id and all fields that shall be updated.

To create a record: Leave out the id.

Request
POST https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables/A/records

Headers

Content-Type: application/json

Body
[{
"id": 1,
"fields": {
"First Name": "Erica-Maria"
}
},{
"fields": {
"First Name": "Lisa",
"Last Name": "Schmidt"
}
}]

Response
[{
"id": 1,
"sequence": 418,
"createdAt": "2018-06-13T12:16:32",
"createdBy": "ekL2xSxuD7jtN2F2D",
"modifiedAt": "2018-06-15T16:05:07",
"modifiedBy": "ekL2xSxuD7jtN2F2D",

112
Ninox User
Manual

"fields": {
"First Name": "Erica-Maria",
"Last Name": "Young"
}
},{
"id": 48,
"sequence": 418,
"createdAt": "2018-06-15T16:05:07",
"createdBy": "ekL2xSxuD7jtN2F2D",
"modifiedAt": "2018-06-15T16:05:07",
"modifiedBy": "ekL2xSxuD7jtN2F2D",
"fields": {
"First Name": "Lisa",
"Last Name": "Schmidt"
}
}]

Create Records
See Update Records, the same request can be used to create records by leaving out the id.

Delete a Record
A single record can be deleted with the following request. At the time, it's not possible to delete multiple records
with one request.

Request
DELETE https://api.ninoxdb.de/v1/teams/67mm9vc324bM7x/databases/nk5xt24oixj4/tables/A/records/1

Response
{}

An empty object indicates that the deletion took effect.

Table Definitions
Tables are defined by an id, a human-friendly name and an array of fields. Table ids start with "A", "B", … "AA",
"AB", …

Each field is defined by an id, a human-friendly name and a type. Field ids start with "A", "B", … "AA", "AB", …

Note: Table and field ids won't change during the life time of a database. Don't make assumption about the
format of an id but use this as an opaque identifier since the format may be subject to change in future versions.

Field types are defined as follows:

Ninox Field JSON


Example
Type Value
text string "Lisa"
number number 13.42
date number "2018-01-23"
datetime string "2018-01-23T12:30:00"
timeinterval string "123:25:16.123"
time string "12:30:00"
appointment string "2018-01-23T12:30:00 - 2018-01-23T13:30:00"
boolean boolean true, false
choice string "Blue"
url string "http://ninoxdb.de"
email string "support@ninoxdb.de"
phone string "+1 123456789"
"Marienstraße 10, 10117 Berlin, Germany
location string
<52.52202224731445,13.38234806060791>"
html string "<h1>Hello</h1>"

Fetch Files From Record


With the following request you can fetch files accociated with the record.

Request
GET https://api.ninoxdb.de/v1/teams/:teamid/databases/:databaseid/tables/:tableid/records/:recordid/files

Response

113
Ninox User
Manual

[{
"name": "image3.jpg",
"contentType": "image/jpeg",
"size": 56969,
"modifiedDate": 1550506659843,
"modifiedUser": "......",
"seq": 220
}]

Download File From Record


With the following request you can download files attached to a record

Request
GET https://api.ninoxdb.de/v1/teams/:teamid/databases/:databaseid/tables/:tableid/records/:recordid/files/:filename

Response

The file itself

Upload File To A Record


With the following request you can upload files to Ninox record

Request
POST https://api.ninoxdb.de/v1/teams/:teamid/databases/:databaseid/tables/:tableid/records/:recordid/files

Content-Type
Content-Type: multipart/form-data

Valid File Names

The name of the file to be uploaded should not contain the following special characters \,/,*,?,>,<,|,"

Response
A response message saying "File Uploaded Successfully" with Content-Type = text/html and a status code of 200 OK

Delete File From Record


With the following request you can upload files to Ninox record

Request
DELETE https://api.ninoxdb.test/v1/teams/:teamid/databases/:databaseid/tables/:tableid/records/:recordid/files/:filename

Valid File Name

Please enter the name of the file with the file extension.

Response

- A status code of 204 No Content without any message in case of successful deletion.
- A status code of 404 Not Found along with text message saying "File already deleted" in case of file not found/already deleted".

114
Ninox User
Manual

13.3. Ninox HTTP Calls


With the NX scripting language it is possible to call other services on the Internet. With the http function you can
either query for information from other REST services or send updates.

The http Function


With this function, it's possible to call another HTTP endpoint.

Syntax
http(method, url)
http(method, url, body)
http(method, url, headers, body)

Parameters

method: "GET", "POST", "PUT", "DELETE"

url: a valid http/https url

headers: a json object specifying the http header

body: a string or an arbitrary json object, see below

Return Value

A json object containing either an error or a result property.

Note 1: The http function must not be used in triggers.

Note 2: When called from a button, the http function will execute in the client/web browser context. This can be
prevented by using a do as server http(…) end block.

Examples

A simple GET request

let response := http("GET", "http://mytestservice.com/path");


if response.error then
alert(text(response.error))
else
alert(text(response.result))
end

A GET request including an authorisation header

let response := http("GET", "http://mytestservice.com/path", {


Authorization: "Bearer API-Key"
}, null);
if response.error then
alert(text(response.error))
else
alert(text(response.result))
end

A POST request

let response := http("POST", "http://mytestservice.com/path", {


hello: "World",
'special character property': 1234
}, {
Authorization: "Bearer API-Key",
'Content-Type': "application/json"
});
if response.error then
alert(text(response.error))
else
alert(text(response.result))
end

Calling Services in Server Context


Sometimes, it is desirable to not execute HTTP requests in the context of the client but in the context of the Ninox
Cloud server. This is especially required when calling endpoints that are not secured by SSL — since the Ninox
native apps for Mac, iPhone and iPad are not able to query such insecure endpoints.

To enforce execution of code on the Ninox Cloud server, you can embed in a do as server block. Example:

115
Ninox User
Manual

let response := do as server


http("GET", "http://mytestservice.com/path")
end;
if response.error then
alert(text(response.error))
else
alert(text(response.result))
end

Constructing URLs
URL query parameters need a special encoding when they contain spaces or special characters. NX script provides
a range of functions to handle that encoding:

urlEncode("Test Parameter") —> "Test%20Parameter"


urlDecode("Test%20Parameter") —> "Test Parameter"
url("http://mytestapi.com", { page: 1, perPage: 20, order: "First Name" })
—> "http://mytestapi.com?page=1&perPage=20&order=First%20Name"

Construction JSON Objects


JSON objects are denoted quite similar to the JavaScript syntax. Curled parenthesis { } denote an object. Object
properties are in the form name: value, separated by comma. Braces [ ] denote an array. String values are
expressed by double quotes "value". Number values as plain numbers with a dot as the decimal separator, like
12.56.

Some examples:

{ } — an empty object
[ ] — an empty array
12.56 — a number
"Lisa" — a string
{ name: "Lisa" }
{ name: "Lisa", age: 28 }
{ name: "Lisa", age: 28, address: { street: "A Street" } }
{ name: "Lisa", children: [ { name: "Charlie" }, { name: "Sarah" } ] }

Escaping object property names:

When a property name contains spaces or special characters or starts with a number, it needs to be quoted in
single quotes ' '. To include a single quote within a property name, write two single quotes, e.g.
{ 'Lisa''s name' : "Lisa" }

Note on key words: reserved key words like order, from, to can but do not need to be escaped in single quotes
when used as a property name.

Escaping string values:

String values need to be enclosed in double quotes " ". To include a double quote within a string value, write two
double quotes:
{ name: "Lisa ""the quoted"" Maria" }

Using expressions to construct a JSON object

Property values and members of arrays can also be constructed using arbitrary NX expressions. Some examples:
{ result: 10 * 5 + 6 } —> { result: 56 }
{ powers: for i in [1, 2, 3] do i*i end } —> { powers: [1, 4, 9] }

Evaluating JSON Objects


Most services will return JSON objects. With NX script it is possible to handle and evaluate JSON objects.

Get a property

The dot notation gives easy access to properties. Examples:


response.result.id
response.result.fields.'First Name'

Converting values

Since NX script is internally a strong static typed functional language, and there's no schema definition for a JSON
object, it is sometimes necessary to explicitly specify or convert the type of a property. Use the functions text,
number, date, datetime, time, appointment, url, phone to convert values. Some examples:
number(response.result.id)

116
Ninox User
Manual

text(response.result.fields.'First Name')
date(response.result.fields.'Birthday')

Handling arrays

The functions first, last and item can be used to extract an item from an array:
first(response.result)
last(response.result)
item(response.result, 3)

To loop over the items of an array, use a for in loop:

let firstNames := for item in response.result do


item.fields.'First Name'
end

117
Ninox User
Manual

13.4. Zapier
Connect Ninox to hundreds of other apps with Zapier
Zapier lets you connect APP to 1,000+ other web services. Automated connections called Zaps, set up in minutes
with no coding, can automate your day-to-day tasks and build workflows between apps that otherwise wouldn't be
possible.

Each Zap has one app as the Trigger, where your information comes from and which causes one or
more Actions in other apps, where your data gets sent automatically.

Getting Started with Zapier


Sign up for a free Zapier account, from there you can jump right in. To help you hit the ground running, here are
some popular pre-made Zaps.

How do I connect APP to Zapier?


1. Log in to your Zapier account or create a new
2. Navigate to "Connected Accounts" from the top menu bar.
3. Now click on "Connect new account" and search for "Ninox"
4. Use your credentials to connect your Ninox account to Zapier.
5. Once that's done you can start creating an automation! Use a pre-made Zap or create your own with the Zap
Editor. Creating a Zap requires no coding knowledge and you'll be walked step-by-step through the setup.
6. Need inspiration? See everything that's possible with Ninox and Zapier.

Creating an Automation
1. Log in to your Zapier account or create a new
2. Navigate to "Connected Accounts" from the top menu bar.
3. Now click on "Connect new account" and search for "Ninox"
4. Use your credentials to connect your Ninox account to Zapier.
5. Click on Make a Zap
6. Choose App: Search for Ninox (if you see multiple Ninox apps then select one without a version number)
7. Choose between one of two triggers:
New Record will fire whenever a new record has been created in a specific table
Updated Record will fire on update of a record in a specific table
8. Choose an Action App, e.g. Slack
9. Configure the app according to the app's documentation.

118
Ninox User
Manual

14. Ninox Private Cloud on Premise


14.1. Ninox Private Cloud on Premise - Installation
System Requirements
Supported Operating Systems

Windows Server 2008 or later

Minimum Hardware Requirements:

4 GB RAM
2 vCores
100 MBit network connection
120 MB free disk space for the installation files
10 GB free disk space for application data (actual requirement depends heavily on the use case, a scalable
store solution is recommended)

Environment dependencies:

DNS name
Free port (e.g. 80 or 443, other ports can be configured as well)
HTTP(S) connectivity client => server
SSL certificate (#PKCS12 / .pfx) with or without private key passphrase (note: passphrase will be stored as
plain text in the configuration file)
SMTP server with or without authentication

Recommendations

Ninox data files should be stored on SSD storage


Implement a backup strategy, we recommend to have at least two layers of backup
VM snapshots
File system based incremental backups of the data directory
Implement a fail-over strategy

Network Configuration

Ninox client/server communication is based on HTTP(S).

There are multiple ways to configure a Ninox installation, however the following properties must be given:

Clients must be able to connect to the Ninox server by HTTPS via TCP/IP.
A DNS name for the Ninox server (or the first component in the configuration that terminates the client
connection) that reliably resolves to the server's IP.
Static IP addresses are highly encouraged, DynDNS is not recommended.
If clients connect from the Internet and intranet, they need to use the same address / DNS name.

A) Simple setup

Client —HTTPS—> Server

The basic configuration requires, that Ninox Server exposes a port for HTTP communication on the internet or
private network.

B) Forward Proxy setup

Client —HTTPS—> Forward Proxy —HTTPS—> Server

This setup is recommended for installing a Ninox server in a corporate intranet.

C) DMZ setup

Client —HTTPS—> Reverse Proxy —HTTP—>Server

In a DMZ environment, a reverse proxy will terminate any client-side communication. This is the recommended
configuration for environments that already implemented a DMZ. There are multiple advantages:
Centralized certificate management on the reverse proxy
Reverse proxy can act as a security component with traffic inspection

Requirements for reverse proxy:

Allow all HTTP methods (GET, PUT, POST, DELETE, OPTIONS, HEAD)
TCP timeouts must be higher than 60 secs
No path rewriting rules, Ninox cannot be mounted on a sub-path
119
Ninox User
Manual

Ninox may use heavily parallel TCP connections. Make sure that the reverse proxy is capable of handling
those (calculate at least 2 concurrent connections per concurrent client)

Configuration File
Edit the server-config.json file in the installation directory.

Remarks: The file must be a UTF-8 encoded JSON format compliant file. It must not involve proprietary UTF-8
encoding headers. On Windows, please don't use Notepad to edit this file, instead use Notepad++ or SublimeText
to edit the file.

The file provides the following configuration options:


{
"data": "data",
"ssl": false,
"host": "localhost",
"port": 8080,
"bindPort": 8080,
"bindInterface": "0.0.0.0",
"redirectPort": 9090,
"workers": 2,
"emailHost": "",
"emailPort": null,
"emailSecure": true,
"emailUser": "",
"emailPassword": "",
"emailFrom": "",
"apiAuthorization": "Bearer 123456789123456789",
"die": 60000
}

data: Absolute path (or relative from the installation path) of the data directory.

ssl: Either false to not use SSL or


{
"passphrase": "passphrase"
"key": "private.key"
"ca": "ca.pem"
"cert": "cert.pem"
}

passphrase: Passphrase of the encrypted key

key: Path of the key file

ca: Path of the CA certificate (if not included in the certificate file)

cert: PEM encoded certificate (may include chain)

host: The publicly visible domain name

port: The publicly visible port

bindPort: The local port, the HTTP server should bind to (usually the same as port)

bindInterface: The local network interface, the HTTP server should bind to (use "0.0.0.0" to make available on all
interfaces.

redirectPort: If set and SSL is activated, the server will start a secondary HTTP server on that port which
redirects any request to the SSL port.

workers: the number of HTTP worker processes, at least one, should not exceed the number of available cores. 4
should be sufficient even for major setups.

emailHost: The host of the outgoing SMTP server

emailPort: The port of the outgoing SMTP server

emailSecure: Use SSL

emailUser: SMTP authentication user

emailPassword: SMTP authentication password

emailFrom: The sender's address, e.g. ninox@mycompany.com

apiAuthorization: An optional authorization method for Ninox API calls. The value will be compared to the HTTP
Authorization header.

120
Ninox User
Manual

die: The number of milliseconds, a Ninox team will be kept alive after the latest request has ended. Should be at
least 60000.

Certificates

Though not required, it's encouraged to secure Ninox client/server communication with SSL. This requires to
deploy a SSL certificate with the server.
Ninox supports two types of certificate formats:

PFX / #PKCS12

Configuration:
"ssl": {
"pfx": "certificate.pfx",
"passphrase": "secret"
}

PEM

Configuration:
"ssl": {
"ca": "ca-certificates.cer",
"cert": "certificate.cer",
"key": "private.key",
"passphrase": "secret"
}

121
Ninox User
Manual

122

You might also like