Sets currently repeated item property to a new value

I would like to set one of my currently repeated item properties to a new value, by tapping a component.

I know the flow function “Set repeated item value” only works if the repeat source is a direct binding to a page/app/data variable and not a formula, but I have to work with a formula…

Would it be possible to achieve this?

Hi, for example if the source data is in a page variable, you can do the following in a “Set page variable” node:

MAP(pageVars.myList, IF(item.id === repeated.current.id, SET_KEY(item, "propertyToChange", "newValue"), item))

So you create a new version on myList with MAP, changing only the one matching item with SET_KEY, otherwise the items stay unchanged.

Great! That’s exactly what I did yesterday night :wink: Thanks for your support @Mari :slight_smile:

But I worked with a data variable, a “Set data variable” and the SET_ITEM and SET_KEY formulas :slight_smile:

1 Like