Setting a data field to blank/undefined

Hi all

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.

I’d love to hear everyone’s thoughts!

Setting a value to blank makes it null (“empty” in Bubble parlance).

1 Like

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.

Thanks Keith…the data field I wish to set to blank is type ‘Budget Item’ - I can’t see how to set this 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.

See 20 minute mark in the video here:

You’re a marvel. Thank you Keith!!