Forum Discussion

JulieMeeker's avatar
JulieMeeker
Qrew Trainee
3 years ago

How to iterate through a list in a Text-Multiline field

My app needs to scan a bunch of tracking numbers (child) and assign them to a related parent.  I created a Text-Multiline field in the parent record and each entry in that field is separated by a line feed.  In a pipeline, is there a way to iterate through the list to look up each child and of course set the related parent in the child record?

------------------------------
Julie Meeker
------------------------------

1 Reply

  • If I've understood correctly, the text-multiline field contains the list of tracking numbers. You should be able to use 'Find all matches to a Regex' to extract the tracking numbers and then insert a loop in which you search for each child record using the  and update it with the record ID from the record in the trigger.

    I've used this approach to do something similar. The challenge (for me at least) was to form the correct Regular Expression. In my case (?<=~~).+?(?=~~) was used to pull out each string between separators of '~~'. To pull out text on separate lines the Regular Expression might be something like ^.+$, which looks for any number of characters between the start of a line and the end of a line.

    Hope that helps a little.




    ------------------------------
    Jeremy Anson
    ------------------------------