For the complete documentation index, see llms.txt. This page is also available as Markdown.

Global functions

Create reusable scripts that you can use throughout your app.

Use Global functions to write a function once and use it anywhere in your app. A global function stores shared logic that several fields, buttons, or automations need. When you update the function, every place that calls it uses the new logic.

Global functions belong to one app. They are not shared with other apps.

Create a global function

1

Open Scripting

Open your app and enable Builder mode. In the app navigation, select Scripting.

2

Add a global function

Select Add and choose Create global function.

3

Name the function

Enter a clear, descriptive name, then select Create. Use a descriptive name that explains the result or action. Keep each function focused on one task.

4

Write and save the script

Write the reusable script in the editor. Select Save when you are done.

To create or update a global function with Ninox AI, select the tab with the stars. Simply describe the function you need. Refine it if needed and Accept.

In the Scripting screen you can:

  • Select a function to open it in the editor.

  • Use Search in files to find a function by name.

  • Select Add to create another global function.

  • Switch between open functions using the tabs.

Rename or delete a global function

Move the cursor over a function in the Global functions list to show ⋮. Use the menu to rename or delete the function.

Call a global function

Define a function that returns the value or performs the action you need. Then call it from any other scripts in the app.

For example, define a function that returns a welcome message:

Call the function by its name, welcomeMessage(), where you need it. For example, use it in a logic field or a button to show a message:

Last updated

Was this helpful?