About Interactions

Much of the functionality of an App Builder app occurs through "interactions" between the application, data services, and components. Interactions might or might not require data services. Each interaction can exist between only two components and perform only one action. Each component, though, can have multiple interactions.

For example, if you create a data service based on a Mongoose IDO, you can instruct the data service to load certain property values into a component such as a List or a Datagrid whenever the app is launched. This creates an interaction in App Builder designed to load the appropriate values from that IDO and display them in the component as soon as the app opens.

Other interactions can be created such that, when a user action takes place in one component, it triggers something to happen in another component. For instance, you might have a drop-down list that, when you select an item from the list, populates text fields with other property values from that data service.

When the Interactions tab is selected and a component is selected, the Properties panel displays a list of all interactions associated with the selected component at the top of the panel. This can be very helpful in determining what, exactly, is going on with each component in your app. To see the particulars about an interaction definition, click that interaction in the list.

The + Additional Data Mapping button at the bottom of the panel is enabled whenever you are using a data service that requires one or more input parameters. In this case, click the button to open a dialog box to provide the input parameters.

The structure of interactions

Interactions typically consist of two parts: the Trigger Event and the Target Action.

The trigger event is something that happens within the app, usually by some action taken by a user. It can also be something that happens elsewhere, for example, when the app first loads.

The target action is what happens when the trigger event occurs. For example, a user clicking a button (the trigger event) can cause a data grid to load and display the data.

Trigger events

Interaction trigger events include, but are not necessarily limited to these:

  • On Startup - This event is triggered automatically when the app launches.
  • On Load - This event is triggered when data is loaded from a data source without the use of a Data Service.
  • On Click - This event is triggered by the user clicking the mouse on the component.
  • On Changed - This event is triggered by the user changing the value of an item or object.
  • On Checked - This event is triggered by the user selecting a check box.
  • On Not Checked - This event is triggered by the user clearing a check box.
  • On Item Updated - This event is triggered when the user updates an item.
  • On Selection Changed - This event is triggered when the user selects an item or object in the component.
  • <Data Service> has run (On Load) - This event is triggered as soon as the data service has been run.

Target actions

The target actions available always depend on what component is associated with the trigger event and on what component is the target of the action. Interaction target actions include, but are not necessarily limited to these:

Note: When an action that is described in this list as either <Data Service> or (No Data Service) has a data service assigned to it, the "data service" text is replaced by the name of the assigned data service; for example, Run Usernames.
  • Clear - This action clears the contents of the target component.
  • Run <Data Service> - This action runs the data service associated with the target component and gets all appropriate values.
  • Get (No Data Service) - This action returns the data for a single record.
  • List (No Data Service) - This action returns the data for multiple records.