With Dropsource Actions, you can achieve the user experience you need by adding Actions for a range of functionality types, including native functions that leverage other apps and data on the user device. You can also add logic and control flow to your app with nested Actions that execute when conditions are met.
You can add multiple Actions to the same Event, and they will execute in the order listed – use the arrow buttons to reorder them. Any Action with the terminal icon must be last in the list for an Event.
With an Action open, click Edit (if the Action requires editing), making a selection for any fields listed, and Save.
Some Actions return data – in this case you will see a Returns section.
You can access any data returned by an Action in the Action Data container for other Actions in the same Event scope (including nested Actions).
You can also access information about the Event, via the Event Data container.
Selecting Action Inputs
Most of the Actions you use in Dropsource expose parameters you can set. For example, the Set Value action allows you to assign a values from an input source in the app to any of its Elements or variables.
The available input selections are tailored to the Action and relevant data type in each case. Certain Actions include the ability to dynamically add inputs – such as the alerts on both platforms, in which you can add buttons and Dropsource will automatically create nested Events to respond to taps on each one.
Your app can carry out basic arithmetic calculations using the Calculate Math Expression Action. Your calculation can reference input values added statically or from the sources in your app (including variables, user input, and API data). Add a Variable to include in your calculation, choosing an input source for its value, then reference it in the Expression field as part of your formula.
You can access the returned number value in other Actions added to the same Event in your app.
On Android, the math Action will return a double number type, which you can cast to another type such as integer by saving it to an integer variable. On iOS the action returns an NSNumber type, allowing you to select various types from the Action Data returned, including int, double, float, and string.
The Build a String Action uses a similar pattern to interpolate text strings by referencing sources in your app. Add Variables for any values you want to build into the string, and reference them in the Template field enclosed in double curly braces and along with any string literals you need.
You can access the returned string via the Action Data and build it into subsequent processing in your app.
The math and string building Actions will dynamically highlight and validate your input as you type it into the Template / Expression fields.
Some Actions include nested Events of their own, allowing you to build control flow into your app. The If Else Action carries out a logic test on two input values, which can come from various sources in your project such as Elements and variables. You can then add Actions to execute when a true or false result is returned.
If your app contains an API response with an array in it, you can carry out Actions on each item in the array using the Iterate through Array Action.
If you don’t see the functionality you need, you may be able to add it to your project using a Plugin.