Repeat action help

Hello,

I'm trying to simply do a repeat on a single action. (Before doing something more complicated, I would like to test)
I've made a specific example for that, because I can't make my process works.

With a simple modify column, on a simple column, removing text on conditions.
If it contains this text and this text, or this text and this text, so remove this one.
It's like 'text1,text2,text3,text4' -> If it contains "text4", remove "text4".
And there is a condition inside to remove all the comma.
I need to to this multiple times on the same column, to finally have only one word, without comma.
That is why I need to use a repeat.

But, I can't make it works multiple times ?
What I understand with the repeat action is : I need to repeat my process until something.
So in the action, there is "Until result table is empty".
Perfect, if I put a derived table on condition, when the condition is not met, it will be empty.

I use the input action in the repeated module to get my rows :

This is my repeated module, where you can see my condition inside the derive table (if any row has a comma) :

In my case, I need to do the modify column 4 times to have a result without any comma inside.
This process works only 1 time.
If I put multiple times my modify column, it works well (so without the repeat).

Of course, I would like to retrieve the last processed values.
Here I retrieve the values, but after 1 "Repeat" done.

Am I using wrong the conditions for the derive table, or the repeat condition and mode ?

Thank you for you help.

Hi Windblast,

I am just another community user like yourself. Out of curiosity is the text that you are looking for always in a certain position? Does the length vary?

For example, where you write ''text1,text2,text3,text4' -> If it contains "text4", remove "text4".'
Are you always trying to get to text1 without the comma as the final result? Or do you need to find an unknown text string at different positions when separated by the comma? How would you know the correct one to select for?

Easymorph has a text function called 'keepbefore' which will let keep all the text in the string up until the specified delimiter value. And you can feed the expression an occurrence count if you need to keep up to a certain position in your list. If text you are looking for can vary in position though, you probably wouldn't want to use this.

If your list can have different lengths and you are trying to loop or repeat an action, how would you know when you want it to stop? Or how would you know you have found the correct substring?

If you have a bunch of conditions that you are looking to check for, then you might be able to use the rule action. Create all of your conditions for checking the rule within the string and then based on satisfying the condition, replace the value with any string you want and you don't need to have a comma included.

So far, I am not immediately seeing why you need to specifically repeat any actions. Do you have a slightly more concrete example of your use case by chance?

Hi @WindBlast ,
I'm not really sure what it is you are starting with and what your desired result would be.

If you have a field containing "text1,text2,text3,....textX" and are trying to get just "text1" then as @Perk suggested, there is the keepBefore() function which you can use either to calculate a new column or to modify the existing one:

keepBefore([MyField], ",")

If this isn't what you are trying to achieve, can you share your simple example and some more information?

Regards
Matt