Forum Discussion
KristofferKeen1
Quickbase Staff
You can use the Text channel to "Find All Matches to a Regex", and use the following Regex: ([^;]+) if you go with the multi-select option which separates values using a semi-colon. Otherwise, you can change the semi-colon to a comma in the middle of the regular expression, since the comma is the delimiter in your use case: ([^,]+)
Then For each "match/Regex filtered group" (because it's split by a semi-colon or a comma in your case), you can then use each group to create a new record.
So in the subsequent create record step, map the regex step's Group 1 to the new table: {{b.group_1}}
See screenshots below for reference.
Enjoy!
------------------------------
Kristoffer Keene
------------------------------
Then For each "match/Regex filtered group" (because it's split by a semi-colon or a comma in your case), you can then use each group to create a new record.
So in the subsequent create record step, map the regex step's Group 1 to the new table: {{b.group_1}}
See screenshots below for reference.
Enjoy!
------------------------------
Kristoffer Keene
------------------------------
BrittanyScheid
2 years agoQrew Cadet
Hi Kristoffer,
I'm brand new to regex but I'm trying to loop through the users in a List-User field to then create a child record for each. I used the expression and process you indicated above, but it seems to only be returning the first user, not any of the others. I wasn't sure what all the other fields should be set to in the Query step, so I just left them as the defaults. Any help would be greatly appreciated! Thanks!
------------------------------
Brittany Scheid
------------------------------
I'm brand new to regex but I'm trying to loop through the users in a List-User field to then create a child record for each. I used the expression and process you indicated above, but it seems to only be returning the first user, not any of the others. I wasn't sure what all the other fields should be set to in the Query step, so I just left them as the defaults. Any help would be greatly appreciated! Thanks!
------------------------------
Brittany Scheid
------------------------------
- KristofferKeen12 years agoQuickbase StaffHey Brittany-
Looking at your screenshot, the jinja looks correct. So I want to double check:
- that you grabbed the correct list-user field?
- there is more than 1 user listed in that field for the record you found
- do you have the for each loop after this step?
------------------------------
Kristoffer Keene
------------------------------- BrittanyScheid2 years agoQrew CadetHi Kristoffer,
Thanks for your response. See my answers to your questions below:
- that you grabbed the correct list-user field? Yes
- there is more than 1 user listed in that field for the record you found. Yes, I've tried multiple various selections and triggered the pipeline several times.
- do you have the for each loop after this step? Yes. See the attached screenshots.
------------------------------
Brittany Scheid
------------------------------- KristofferKeen12 years agoQuickbase StaffHey Brittany-
Figured it out! Even though you could convert theUserList
field into a formula text field and use the regex to split that text field. Here's a way to not need that helper field and use theUserList
field directly in pipelines.
UserList
is an array of objects so you need to extract the email attribute from all the objects and then parse that list.
This Jinja will extract them to create a single string that you can use in regex:{{ a.user_list | map(attribute="email") | join(";") }}
------------------------------
Kristoffer Keene
------------------------------