FAQ Data Service
Schema Design
How can I validate that an array does not contain a certain value in a transition condition?
If it is an array of strings, you can use regex expressions. In the following schema definition, you can find an example of a validation where the tag important_tag
should not be present.
The relevant regex expression is ^(?!important_tag$).+$
How can I validate that an array does contain a certain value in a transition condition?
To validate that an array does contain a certain value there are different options. The following examples show how to check if an array contains the value important_tag
.
Each code snippet shows the code in the condition configuration part of the schema.
Option 1 • Use a regex
Option 2 • Use the const keyword
Option 3 • Use the enum keyword
Data Manipulation
How can I remove values from an array property in a record?
If the array items are objects, you can remove an object by executing the following HTTP call:
If the array items are simple values, like strings or numbers, you have to execute a PUT
to the record endpoint and provide the full array (leaving out the value that you want to remove).
Permissions
What is the difference between creatorId and userIds in a document?
The creatorId
refers to the user that created the document, userIds
is an array of users which have access to the document as set by the document permissions. A simple use case is for example if you want to share a single document with multiple individual users which are not necessarily in the same group.
Last updated