How are you, I would like to know if this is possible, what happens is that I have a field in which initially the data is taken from a combobox to text, concatenating what the user chooses with commas, the field is more or less as follows
Text1,Text2,Nancy,Andres,Pedro,Carlos,Juan,Lucia
and so several rows with different texts
I would like to know if it is possible with the function for all () to go through all the elements of the list and update this part of the string with a new name, for example, where there is only Andres in all the rows of the list, update it for Camilo
Is this possible plus the patch + substitute function for example to update only that part of the string ?
@Anonymous
Yes, but your statement implies using the ForAll incorrectly. ForAll is a function that returns a table - it is not a for loop function.
So, your ultimate formula would be similar to the following:
Patch(yourDataSource,
Filter(
ForAll(yourDataSource,
If("Andres" in yourColumnName,
{ID: ID,
yourColumnName: Substitute(yourColumnName, "Andres", "Camilo")
}
)
),
!IsBlank(ID)
)
)
In the above, the ForAll creates a table to pass to the filter (in order to remove blank records based on the If statement) which then returns the table of records to "fix" for patch.
I hope this is helpful for you.
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional