About 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
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:
- - This event is triggered automatically when the app launches.
- - This event is triggered when data is loaded from a data source without the use of a Data Service.
- - This event is triggered by the user clicking the mouse on the component.
- - This event is triggered by the user changing the value of an item or object.
- - This event is triggered by the user selecting a check box.
- - This event is triggered by the user clearing a check box.
- - This event is triggered when the user updates an item.
- - 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:
- - This action clears the contents of the target component.
- - 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.
- - This action returns the data for multiple records.