CollectionView.data[i] and SelectedItem-SelectedIndex is not Working!

Continuing the discussion from CollectionView's selectedItem / selectedIndex does not work:

This is not working! I was fixing the problem using a Variable. Setting the value chosen when I clicked the collectionView, but with the new release in retool is not working anymore. I need help!

update: I checked and the bug with CollectionView.data[i]
applies only in the web editor, still the selectedItem-Index is not working for a collectionView

The solution may be simpler than you think :slight_smile:

How are you setting the text for your buttons (Andamios, Excavacions, etc.)? It's probably something like {{item.something}}.

So in your click handler value, simply use {{item.yourfield}} (where 'yourfield' is one of the fields of the respective data) or just {{item}} if you want the entire object and not just one field.

1 Like

Thank you! :grinning:

1 Like