Forum Discussion
KristofferKeen1
Qrew Trainee
Hey Francesco-
How are the date fields separated? (with a semi-colon or comma or another delimiter?)
------------------------------
Kristoffer Keene
------------------------------
How are the date fields separated? (with a semi-colon or comma or another delimiter?)
------------------------------
Kristoffer Keene
------------------------------
FrancescoSpiga
2 years agoQrew Member
Thanks for your quick reply Kris.
Well, I have the two dates in 2 separate fields.
But I could concatenate them in a formula text field with either a comma or a semi-colon... doesn't really matter at this point.
But it seems that in order to use "Find All Matches to a Regex" I need to have a single string to work with, correct?
Although, the real question is: How do I loop between those 2 values?
Thanks again for your help.
------------------------------
Francesco Spiga
------------------------------
Well, I have the two dates in 2 separate fields.
But I could concatenate them in a formula text field with either a comma or a semi-colon... doesn't really matter at this point.
But it seems that in order to use "Find All Matches to a Regex" I need to have a single string to work with, correct?
Although, the real question is: How do I loop between those 2 values?
Thanks again for your help.
------------------------------
Francesco Spiga
------------------------------
- KristofferKeen12 years agoQrew TraineeIf it's just a single date in 2 different fields, then I would just have 2 Create Record steps, 1 step for the first field and create a new record in Table A, and another step for the 2nd field and create a new record in Table B.
You could also have 2 different pipelines be triggered off the two different fields and then the next step creates a different record based on the respective date fields.
However, if you are looking to loop through a concatenated field and say the data is separated via a semi-colon, then 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.
Hope that helps,
Kris
------------------------------
Kristoffer Keene
------------------------------- FrancescoSpiga2 years agoQrew MemberI probably should have clarified earlier in my 1st message :( sorry...
I am trying to loop through those 2 dates and create new records for all the dates in between them.
Example: 8-23-2022, 8-27-2022
This will create 5 records in a new table (8/23,8/24,8/25,8/26,8/27)
How would you manage this use case via pipelines?
------------------------------
Francesco Spiga
------------------------------- KristofferKeen12 years agoQrew TraineeOh that makes more sense!
I recommend creating a "template days" table with every date listed 1/1/22, 1/2/22, 1/3/22 all the through say ....12/30/2030, 12/31/2030 (Feel free to go farther in time, but at any rate, I would create a quick excel table to list all the dates and import them to your template table)
...
From there when your pipeline is triggered, you could search through all the records in between the 2 dates, I believe the Query with Date "is between" includes your two dates
Then have the pipeline create a new record for every date that it finds. That's the short of it.
However, even more efficient would create a bulk upsert, which is probably what you were originally thinking in this thread. So when all the dates are found in between and added to your bulk upsert, then you commit the upsert/import all of your dates. See screenshot below for a list of your steps:
Hope that helps even more :)
-Kris
------------------------------
Kristoffer Keene
------------------------------