You can store data values for basic types in your Dropsource app. However, you cannot use a local database, so for more structured data you will need to connect your app to external data using an API.
Dropsource supports variables at two different levels of scope within your app – Device Variables, for data objects and values that you need to access across the pages in your app, and Page Variables, which are only accessible within a single page.
If you need a page to require data values passed in when the page loads, you can flag individual Page Variables as required – this will prompt you to provide the values when adding Actions to navigate to the page from elsewhere in your app.
You can create and manage Device Variables in the Variables drawer on the left of the editor, with Page Variables on the right.
When you create a variable, choose a name and type for it. The type can be a standard Swift or Java type, for simple values such as strings, booleans, numbers and so on. You can also use object types, including types defined in any API specifications you have imported into your project.
Using Data in your App
You can get and set values from data variables and can retrieve values from processing within your app – these are accessible when you add Actions, and when you send parameters to API requests. For example, when you are working with an Action that supports selecting values from your app, you can choose from the available variables, or from data generated by any Actions and Events in the current scope.
To set the value of a variable, add the Set Value Action to an Event, selecting the variable and an input source for the value you want to assign.
For any data you can’t define locally using variables, use an API to connect it to your app.