Forum Discussion

CurtisMiddleto1's avatar
CurtisMiddleto1
Qrew Cadet
3 years ago

Pipeline Simultaneous Multiple and Single Record Creation Ideas

Hi,

I am working on a workflow solution and am struggling to solve a problem. Hoping someone in the community who has a bit more experience with pipelines may have a (relatively) straightforward solution I'm not thinking of.

Here is what I'm looking to accomplish:
Two tables involved:
1. Parent table  = A
2. Child table = B

Each month, users will have a grid edit report where they can see their B records from the prior month. My idea is they will check the renew checkbox field on this report for B records they want to renew for the current month and save the report. The past month's records will need to stay associated to their A record, so copies of the renewed B records will need to be created and associated with a new A record.

The question I have is, how do I get the trigger to recreate (copy) the B records for each trigger, but only create a single A record to tie them to. Example, a user wants to renew 6 B records, so I would need 6 new B records created, but only 1 A record created that all 6 Bs will be tied to. Ideally I want to accomplish this in a single pipeline, if it's not possible then that is good to know. I'm open to other solutions. I feel like this is just an order of operations solution that I can't wrap my head around currently.

Thanks in advance for the help!

------------------------------
Curtis Middleton
------------------------------

16 Replies

  • To add to this, an idea I had was to have it search A records for an existing record by the end user that would meet certain criteria and if it found one, then to not create a new record. Just not sure how that look from a functional standpoint in pipelines and if that would add a significant amount of run time if it was doing that a dozen times. Though, not sure if there is a more efficient way to implement that.

    ------------------------------
    Curtis Middleton
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      Would it be at all practical to have a button either on the A record or the B record which would be visible in view mode (not grid edit) which would copy the A record and ALL its children and immediately land the user on the New A with its duplicated children. Then the user would use the checkbox on the embedded report to delete the unwanted children?

      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------
      • CurtisMiddleto1's avatar
        CurtisMiddleto1
        Qrew Cadet
        Hey Mark,

        Thanks for taking the time to look at this and I appreciate the alternate solution idea. It is a possibility.
        We don't allow the end user's to delete records, though I am looking to build in a cancel/remove button functionality which would operate in the same way as what you are getting at.

        For my app, it would probably make most sense to have that button on the A record. My concern with a button is for it to finish running the copy/recreate before landing them on the newly created A record.
        How do you envision this button workflow operating? Would it trigger a pipeline?
        I'm familiar with both a formula and pipeline solution based on what you are getting at so you can just give me a relatively high-level idea. But as I mentioned, based on my past experiences I'm concerned about the runtime.

        Thank you!

        ------------------------------
        Curtis Middleton
        ------------------------------