Skip to main content

About events and rules

When you design your app, you may need to associate user interactions to specific app behaviors. For example, when X happens, do Y, where:

  • X is called an Event.
  • Y is called a Rule.

Here are a few examples:

  • When the "Submit deposit" button is clicked, run an automation.
  • When the value of the "Cash In" textbox changes, change the label color to red if the value is < 0.
  • When the help icon is clicked, open the browser to show a documentation page.
  • When a tab button is clicked, change the page container to show a different page.

By specifying what rules to execute when an event occurs, your app becomes a dynamic and interactive console.

Events

Events are triggers that happen when a user interacts with an app or control. Each control supports a single event:

EventControl(s)
Clicked OnButton, Header, Label, Icon, Image, etc
Value ChangedCheckbox, Date picker, Dropdown, Slider, Switch, Text Area, Textbox, List
LoadedPage, Table

Rules

Rules define what actions your app takes when a certain event occurs. Below is a list of the rules that Apps provides:

RuleDescription
Set ValueSets the value of a property.
Show MessageShows a message as a toast notification.
Open a PageOpens a page of the app as a pop-over or as the contents of a page container.
Close Pop-Over/Bottom SheetCloses the current Pop-Over.
Open URLOpens a URL in the browser.
Show/Hide SpinnerShows or hides a spinner overlay to show the app as busy.
If-Then-ElseProvides support for conditional statements in the rules builder.
Reset ValueReverts a control to a default value, or clears it if a default value is not configured.
Create Entity RecordCreates a Data Service entity.
Update Entity RecordUpdates a Data Service entity.
Delete Entity RecordDeletes an entity from Data Service.
Start processStarts a process.
Add to QueueAdds an item to queue.

Reordering rules

To reorder rules, click the "gripper" icon at the left side of the rule name and relocate the rule.

docs image