-
Introduction to Ninox script
The Ninox script language (also "NX script language" or "NX script") is designed to automate simple, repetitive operations, as well as complex work sequences,…
-
The formula editor
This is where you script The input of functions or procedures is done via the formula editor in a Formula (always indicated by fx). These fields are the "entrance" to the formula editor.…
-
Formula editor features
An overview of all basic features the formula editor offers as of version 3.6.0 ℹ️ At the moment, the new formula editor features are available for the web app (app.ninox.com) as well as the Mac app.…
-
Arithmetic operators
Create simple arithmetic operations These operators let you take 2 numeric values, perform a calculation, and return a numeric value. This is mainly about basic arithmetic operations.…
-
Comparison operators
Two values are compared with each other This allows you to compare 2 numeric values. The operators return a result that is either true or false. The output in the Ninox field is Yes (true) or No…
-
Ninox operators
The most important operators for writing scripts Operator Description Examples := A "defined as equal to" operator assigns a value to a field or variable.…
-
Writing dynamic texts
Make texts dynamic via a script To personalize texts, for example, send a letter that looks basically the same as an invoice to many recipients with the respective other data,…
-
Declare variable
let Create a new variable with let and assign a value to the variable using :=. ⚠️ The name of the variable must not be a keyword. For example, let let is not allowed.…
-
Set conditional statement
if ... then ... else ... end Use if ... then ... else ... end to specify an if-then-else conditional statement that has Ninox check whether a sequence of statements should be executed (if... then...…
-
Set multiple conditional statements
if ... then ... else if | switch ... case Create multiple conditional statements by concatenating if-then-else blocks. Write another if after else for another condition and so on—continue for as long…
-
Select and query specific records
select ... where select lets you access any record of any table within a database using a script. Enter the name of the table from which you want to pull records after the select command.…
-
Create and delete records
create | delete create To create a record in a specific table by script, specify the corresponding table name in a button after create. Example create Customers Result: A new,…
-
Sort records
order by Use order by to sort an array of records by a specific field. This is useful when sorting an array first before processing it further. When you use order by in a View layout item,…
-
Repeat conditional statements with loops
for ... in ... do ... end | for ... from ... to ... do ... end | while ... do ... end Loops allow you to automatically execute a code block multiple numbers of times in succession.…
-
Create your own functions
Create your own functions with Ninox to automate workflows according to your needs Advantages write a script once and use it throughout the database concise scripts because you only need your own…
-
Intro to "any" functions
Below is info on how we use the "any" data type here in our Ninox guidance, specifically in the syntax of our functions "any" functions are a bit different Values of the data type "any" as well as…
-
Automatic adjustments
Ninox automatically makes the following adjustments for you Braces Ninox script automatically removes superfluous braces in expressions. For example, 1 + (2 * 3) is saved as 1 + 2 * 3.…
-
Intro to transactions
In Ninox, all actions are performed as transactions. In doing so, a sequence of database operations is summarized in a transaction. We distinguish 2 types of transactions in Ninox:…
-
Read transactions
To find specific records in a table using a filter, Ninox searches the table for records that match the filter. During this process Ninox only "reads" the table in order to display the records that…
-
Write transactions
When you change data within an action, this is referred to as a write transaction. Examples of write transactions The input or modification of data Single statements of a script that change data, e.g.…
-
Execution context
Ninox executes transactions either in the client or on server On one hand, which transaction is executed on server or in the client depends on its type (read or write).…
-
Triggers
Triggers are a cool tool for automating processes Recently, while creating the invoice, we briefly encountered a trigger when we inserted a script at the table level into the Trigger on new record to…
-
Trigger at field level
After we just created our first invoice, the champagne supplier informs us that they are increasing their prices. This means we also need to adjust our prices! Instead of €7.…
-
Assign data via button
A (temporary) button does the work for us here How it works Open the Table Settings of the Invoice Items table. Add the layout field 🆗 Button. Open the Field Settings and enter the following script…
-
Create another invoice
Our 2nd Invoice – Still at the Old Price Let's first create a new invoice with lots of champagne at the current prices. You'll see that everything works perfectly!…
