You can set up conditional logic and apply it to the data mappings, to make them even more powerful. In this guide, we’ll go through how to set up logic for your data and apply it to both individual layers and components.
If you haven’t already, you’ll need to start by creating your first mapping. Toggle to the Mappings tab to either start a new mapping or access the ones you’ve already saved.
Select a dataset source to link toggle to the ‘Logic’ tab. Here you can set up your logic, with or without a condition. For example, if you only want to apply data that contains certain keywords, choose the contains
option from the dropdown and then type the value or word that your data must contain.
After setting up your logic in the dataset field on the left, you can then choose whether to apply this logic to specific layers, or to a component’s properties, on the right.
To a layer
Toggle to ‘Layer’ if you want to apply the logic to a specific layer.
To a component
Or, toggle to ‘Component’ to apply the logic to a component’s properties. Select the property to apply the logic to, which then gives you several options:
<aside> ℹ️ You can also apply data to a component’s properties without any logic. Simply follow the same steps but without setting up any logic for the dataset.
</aside>