Forum Discussion
It seems to me that this would be pretty straightforward with a Pipeline. He would figure out what your trigger is and that would be a on new event type trigger.
Then you would search the tags. Where is the tag number is between the starting tag in the ending tag
then you would have a For Each loop to create the join table records.
In theory, it is more efficient to create a bulk upsert right after the trigger step and then add rows to the bulk upsert and then at the end of the process commit the upsert, but if you're adding say 10 or 20 records, it will be fine be to do the for each loop to create the join table records.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
@MarkShnier I'm trying both methods but the problem I'm having is the search for the tags. I obviously don't have the conditions set properly because the loop just keeps running. Should I be using an advanced query of some sort?
------------------------------
Matt S
------------------------------
- MarkShnier__You3 years ago
Qrew Legend
Can you post a screen shot if your Search filters?
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- MattS3 years agoQrew Member
I seem to have stopped stopped the endless looping but am still stuck. As requested, I've attached a couple of screenshots of the advanced queries I've tried. They produce little to no results.
If I use an advanced query that utilizes the 'EX' function I can get one record to create with the [starting_tag] like I want to but I can't get more than one record created.
If I have one condition set in a normal query I can get one record to be created. The only multiple conditions that work are in the image below but because the conditions are start with and end with, I only create the starting tag and he ending tag. I just cant seem to get the conditions right to run from the starting tag to the ending tag and create records for the starting tag, ending tag, and all tags in-between the two.
------------------------------
Matt S
------------------------------- MattS3 years agoQrew Member
UPDATE:
I van now create multiple records using the bulk upsert method, however the search query doesn't seem to be working correctly because the [Related Plant Tags] that get added to the join are 1) not the correct tags and 2) the number of records created not correct.
In the screenshot below you can see that my [Starting Tag] is 178605 and and my [Ending Tag] = 178610. This should a total of 6 records (tags 178605 through 178606). However, 7 records are created and the tag numbers are not correct.
Also, to get this to work I had to use the "OR" operator instead of "AND". If I use "AND" no records are created. If I use OR I get the issue described above. It is probably also pertinent to note that when I try other tag numbers the number of records created are all over the place. Sometimes 25 records are created, sometimes 41, and other times 7 (as seen in the screenshot). I'm sure I'm missing something basic here but can't for the life of me figure it out.
------------------------------
Matt S
------------------------------