Introduction to scripting at Ninox

Learn what Ninox scripting is, where you can use it, and the core terms you need to start writing scripts.

What is Ninox scripting

Ninox scripting is the built-in language you use to tell Ninox what to do. It lets your app calculate, react, and automate.

You usually add short scripts to a field, button, or automation.

Use scripting when you want to:

  • calculate values in general, or based on several conditions

  • display fields and elements based on certain conditions

  • update other records automatically

  • run actions when something changes

  • connect Ninox to another service

If Ninox already offers a built-in setting for your goal, use that first. Use scripting when you need custom logic or automation.

A small script can already do useful work:

if total > 100 then "High" else "Normal" end

This script checks a value and returns a result. That is the basic idea behind many Ninox scripts.

Scripts in Ninox help you to:

  • automate repetitive tasks

  • calculate values dynamically

  • validate input and enforce rules

  • update related records

  • react automatically to events

  • connect Ninox to external services

Key concepts and terminology

You do not need many terms to get started. These are the ones you will see most often:

  • Table: a group of records of the same kind, such as invoices or contacts.

  • Field: one value stored on a record, such as a name, date, or status.

  • Record: one entry in a table.

  • Script: a block of Ninox logic that reads data, returns a value, or changes data.

  • Statement: one instruction in a script, such as if, select, or for.

  • Variable: a named temporary value inside a script.

  • Data type: the kind of value a script works with, such as Text, Number, Date, Record, or Array. (JSON is rather a format than a data type, the data type is text which has a certain structure like XML etc.)

  • Operator: a symbol or keyword that calculates, compares, or combines values, such as +, =, and, or :=.

  • Function: a ready-made operation such as sum(), date(), or text().

  • Selection: a list of records returned by a query such as select.

  • Context: the place where the script runs, such as a field, button, or automation. Context affects what values are available.

  • Automation: logic that runs automatically when a defined event happens.

  • Logic editor: the editor where you write, format, and troubleshoot scripts.

If these terms feel abstract, that is normal. They become clear once you see them in a short script. Find more definitions in our Glossary.

Where you can use scripts in Ninox

You can use the same scripting language in different places:

  • Logic fields to calculate values automatically

  • Buttons to run actions or logic on click

  • Automations to run logic automatically after an event

  • Queries, filters, and selections to find and sort records

  • Integrations to send data to or receive data from other systems

The language stays the same, but the context changes. For example, a button runs logic when a user decides it should run, while an automation runs because an event happened.

Typical examples are:

  • calculate a discount in a logic field

  • print and save an invoice by clicking a button

  • set a status with an automation

  • send data to an external service

To learn the basic language patterns, see Explore core scripting elements. To learn automation behavior, see Automations.

Getting started with scripting

Start with one small, visible result. That is the fastest way to learn.

1

Start with a simple Button

Buttons are easy to test. You click once and see what happens.

2

Learn the core building blocks

Read Explore core scripting elements to understand statements, variables, data types, and operators.

3

Use the editor to work faster

Read Logic editor features to learn how Ninox helps you format, search, troubleshoot logic, and use AI assistance.

4

Add more functions

Read Work with functions when you need dates, text handling, calculations, selections, or integrations.

5

Automate once the manual version works

Move to Automations after your logic works reliably in a Button or field.

Last updated

Was this helpful?