I have a Repeating Group of budget line items. So that a user can ‘select’ one of the line items (to then see additional detail in a separate group, I’ve created a variable ‘Current Budget Line Item’. When this variable is linked to an item, that item is highlighted.
I’d like for a user to be able to ‘deselect’ a line item when they click on it again. So far I can’t see a way to set the value of ‘Current Budget Line Item’ to ‘undefined’ or empty.
To set a list to null (no items in list, like a search that returns no items) you can use “clear list” in the List operation dropdown that appears in assignment actions. Or “set list” to blank.
That’s not how to track a selection in a repeating group. The selection should be an integer, representing the index of the selected item. Let’s call it Selected.
The selected object is then:
RG’s list of Things:item #Selected
To create the state of no object being selected, set Selected to null.