Extract IDs of items in the DataGrid - selectedRows variable

Hi y’all. This should be easy but I can’t figure it out. I simply need a workflow action(s) that extracts the IDs of all the objects in the selectedRows variable and adds them to a new array variable. But everything I try just keeps adding the ID of the first object in the selectedRows variable over and over. Details in loom. Any help appreciated. :slightly_smiling_face:

Edit: I got this to work immediately with Co-Pilot but really want to understand how to do it with nocode please!

I hope this is nocode enough :smiley:

1 Like

If you need to map over an array, you can just use the map formula.
For the loop action what you are missing is that the loop itself is an action in weweb and the current value of the iteration is available under the workflow variable tab (it’s easier to find if you give the loop a name)
image

1 Like

map() worked perfectly thanks @dorilama. I imagine I will use that a lot from now on!

1 Like