Skip to main content
Question

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

  • August 9, 2021
  • 0 replies
  • 165 views

Forum|alt.badge.img+8
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
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+7
  • Registered
  • August 10, 2021
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
------------------------------