Remove Data Item
Description
The Remove Data Item part allows you to remove a particular value or data object from within a collection. It is located in a process node under the collections dropdown menu.
Use
You can use the Remove Data Item function to delete the value in a specific position within a collection.
Tips & Tricks
This part only accepts the position of an item in a collection as the parameter for removal.
If, for example, you have a checklist of three items, and only the third item is checked in runtime, this occupies position 1 of the collection data model, unless and until item one or two in the UI is checked. At that point item 3 will move from position 1 to position 2 in the collection. As a consequence, you should always take care to remove the correct item.
You can use a loop to check the values in turn and take action when the item value matches, or you can use the query-collection part to identify the path of the item (see below) and then use the pattern matching part to extract the position.
Editor Fields
Field Name | Description | Type/Options | Optional/Mandatory |
Collection | This is the collection from which the system will delete the data object. Specify a pre-existing collection from which data will be deleted. Instead of typing the collection name, you can click the ellipses button to the right of the field and select a collection from the displayed data model. | Text | Mandatory |
Position | This is the position in the collection from which the system will delete data. Specify the numeric position within the collection. You can leave the field blank if you specified the position in the previous parameter using the $(collection_name)[position#] compound naming convention. | Number | Optional |
Example
Download the example project called Add Change Remove Data Item to see this part in use.