Add or Remove a Value From $ Interaction Values
Status
Release Available | Status | Framework Name |
---|---|---|
4.1 | Current | Both Mui and Mint |
General
In the case of components with muti-select enabled, all the selected record ids are stored in $interaction.attr(selectedIds);.
This object gets updated when a user makes a selection or deselection of a record. If this object needs to be updated based on some other user interaction outside the object, we can add the following configurations:
Remove a value
This has to be configured at record-level action.
Code JSON
"handler": { "cruds": [ { "method": "remove", "source": "$interaction(ContactList123:$parent.attr(id);).attr(selectedIds);", "value": { "id": "$this.attr(id);" } } ] }
Add a value
This has to be configured at record-level action.
Code JSON
"cruds": [ { "method": "insert", "source": "$interaction(ContactList123:$parent.attr(id);).attr(selectedIds);", "value": { "id": "$this.attr(id);" } } ]
Example
In the below image, a user can remove a selected service by clicking the delete button under added services actor.