The Data Structures integration allows you to create and manipulate simple data structures. It can be used as both an Action, and as a Computed Column in the Data Editor. When used in the Data Editor, the new column will contain the result. When used as an Action, a destination column must be provided for the result.
These are not guaranteed to be stable, and they are not atomic, meaning that if multiple users change them at the same time, the result may not be what you expect.
Adding and Configuring the Integration
To start using the Data Structures integration, you first need to add it to your project.
- In Glide, click the Settings icon in the upper-right corner.
- Navigate to the Integrations tab and then select Data Structures.
- Click the Add button.
Features
The Data Structures integration has seven features:
- Add element to set
- Array to set
- Empty set
- Remove all elements
- Remove element from set
- Set contains element
- Set size
All Experimental Data Structures features can be used as Actions, as well as Computed Columns in the Data Editor.
Add element to set
Adds an element to an existing set. Note that set elements must be unique, so if you add an element to a set that already contains that same element, the set will not change.
Field | Description | Required? | Example/Notes |
---|---|---|---|
String Set | A set of strings, represented as array | ✅ | ["x", "y", "z"] |
Element | One or more elements | ✅ | x or ["x", "y"] |
String Set (Results) | The destination column | ❌ | Required when used as an Action |
Array to set
Converts an array of values to a set.
Field | Description | Required? | Example/Notes |
---|---|---|---|
String Set | A set of strings, represented as array | ✅ | ["x", "y", "z"] |
String Set (Results) | The destination column | ❌ | Required when used as an Action |
In the example shown below, Array to set is used to create a set containing a list of email addresses from an array.
Empty set
Creates a new, empty set.
Field | Description | Required? | Notes |
---|---|---|---|
String Set (Results) | The destination column | ❌ | Required when used as an Action |
Remove all elements
Remove all elements from an existing set. Results in an empty set.
Field | Description | Required? | Example/Notes |
---|---|---|---|
String Set | A set of strings, represented as an array | ✅ | ["x", "y", "z"] |
String Set (Results) | The destination column | ❌ | Required when used as an Action |
Remove element from set
Remove an element from an existing set.
Field | Description | Required? | Example/Notes |
---|---|---|---|
String Set | A set of strings, represented as an array | ✅ | ["x", "y", "z"] |
Element | One or more elements | ✅ | x or ["x", "y"] |
String Set (Results) | The destination column | ❌ | Required when used as an Action |
In the example shown below, Remove element from set is used to remove the users email in each row from the set of all email addresses. The result is that each row contains a list of all email addresses except the one in the current row.
Set contains element
Checks if an existing set contains an element. Will return either true
or false
.
Field | Description | Required? | Example |
---|---|---|---|
String Set | A set of strings, represented as an array | ✅ | ["x", "y", "z"] |
Element | A single element | ✅ | x |
String Set (Results) | The destination column | ❌ | Required when used as an Action |
Set size
Count the number of elements in a set.
Field | Description | Required? | Example/Notes |
---|---|---|---|
String Set | A set of strings, represented as JSON | ✅ | ["x", "y", "z"] |
String Set (Results) | The destination column | ❌ | Required when used as an Action |
To learn more generally about Integrations in Glide, including how they affect your app’s usage, check out our Introduction to Integrations.