Make the Index of the Selected Row in an Interactive Table Available in Triggers

I am using an interactive table to display an array of objects. I want to be able to delete the selected row (object) from that array.

If I had access to the index of the selected object I would be able to delete that row using the “Remove at index in Array” method.

I cannot use the ARRAY_INDEX_OF() function since the function does not take objects as a type.


Hey Kellen!

Noted - we definitely want to improve how we treat Objects, and this is a great point toward that effort.

For now, I would use this method as a workaround:

I have a table MyTable with columns Name, Count, Date, and I want to remove the item with name Test2.
I can do this with the following method (and likely this can be grouped in a single expression: )

  1. Get all Names - map_to_text_list(MyTable, 'Name') - returns one-width List of all Names, like {Test1, Test2, Test3, ...} and save in listofNames
  2. Find Index of intended item: array_index_of(listofNames, 'Test2') , returns index 1
  3. Return to original object MyTable and remove item at index 1.

In short, you can find the index in question once you flatten the Object array to a single width.

Hope this helps!

Yup, that is what I am doing now, just throwing it up as a product suggestion since it would save some dev time and computation if the index was available.

Thanks for the reply :+1:

1 Like