1. Home
  2. Documentation
  3. Using Dropsource
  4. Defining Functionality
  5. Managing App Data

Managing App Data

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.

Creating Variables

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.

variables

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.

page variable action

You can create and manage Device Variables in the Variables drawer on the left of the editor, with Page Variables on the right.

page variables

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.

variable types

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.

data select

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.

set variable value

For any data you can’t define locally using variables, use an API to connect it to your app.

Was this article helpful to you? Yes No

How can we help?