AnsweredAssumed Answered

Pulling data from multiple lists out of a single text field

Question asked by hammer32 on Nov 22, 2018
Latest reply on Nov 23, 2018 by hammer32



I've got a text document which contains multiple lists.  I'd like to create a record for each item of each of those lists.


I've got the text document pasted in to a single text field of a record.  I've got a simple script that pulls out the data that will be the same for each record (a case ID), so I know they are from the same document and are related records.


How would I go about pulling the items in each list?


The data is structured something like this:


Case ID xxxx


**** Residences ****


(1) 123 any street, city, st zipcode


(2) 234 Main Street, city, st zipcode


(3) 567 Pine Ave, city, st, zipcode


**** Schools ****


(1) College 1, addr, city, st, zipcode


(2) High School, addr, city, st zipcode


I'd like to end up with 5 related records in a table:


Case ID; Activity Type (Residence or School); Name (if School); Address; City; State; Zip


I assume this would be possible with a loop of some sort, and a search for everything between Residence and Schools would be a residence, everything between Schools and the end of the file would be a school, but I've never used a loop before...


Thank you very much for any advice!