User interface

Learn how to show messages in Ninox scripts.

User interface and navigation functions shape what users see and where they go next. This chapter shows you how to prompt users.

All UI-bound functions in this chapter run only on the client. They have no effect on the server.

Function (A-Z)
Task

alert()

Show a simple message

dialog()

Show a dialog with answer options

Show messages and call up records

Use these functions when you want to guide users with a message or show record details without changing the main view.

Show a simple message with alert()

Use alert() to show a pop-up with a message and an OK button.

Use it when you want to:

  • Confirm a successful action.

  • Warn about missing input.

  • Show information the user should acknowledge before continuing.

alert(any)

  • any: the value or message to show

alert() returns no value.

Let’s take a look at some examples:

Shows a pop-up with an OK button.

Shows the current time when the pop-up opens.

Tips:

  • Keep messages short.

  • alert() runs only on the client.

  • If one script calls alert() several times, only the last call is shown.

  • Use dialog() when users need a choice, not just confirmation.

Ask for confirmation with dialog()

Use dialog() to show a dialog with a title, message, and answer options.

Use it when you want to:

  • Ask the user to review one decision.

  • Let users choose between clear answers such as Yes and No.

dialog(string, string, [string])

  • first string: the dialog title

  • second string: the dialog message

  • third [string]: the answer options to show

dialog() returns the selected answer as a string.

The script waits until the user picks an answer.

Let’s take a look at some examples:

Opens a confirmation dialog for a delete action.

Deletes the current record only if the user confirms.

The user is asked to double-check the questionable input.

Tips:

  • dialog() runs only on the client.

  • Store the result in a variable when later steps depend on the answer.

Common UI and navigation recipes

These short patterns cover common ways to guide users through an app.

Show short success feedback

Shows immediate feedback after a successful action.

Ask for delete confirmation

Prompts the user before a destructive action.

Last updated

Was this helpful?