Expand all | Collapse all

Create New Action In Same Table

  • 1.  Create New Action In Same Table

    Posted 09-20-2017 20:43
    I'm trying to create a new Action that will allow for the automated creation of a new record in the same table.
    This particular app is our CRM, so I would like to have a new renewal record created in the same table, only after the opportunity is booked as closed.

    So workflow wise, it would be 

    All within the Pipeline Table

    Opportunity A is opened and all information required to close and book is entered.
    Upon Save, Opportunity A(r1) is automatically created in the Pipeline Table.

    I also may be interested in having the automated creation of 
    Opportunity A(r1)
    Opportunity A(r2)
    Opportunity A(r3)

    I've tried using the "Actions" button in the table settings, but it will not let me create within the same table.  It does not display as an option.



  • 2.  RE: Create New Action In Same Table

    Posted 09-20-2017 21:37
    Hi Mike. You can do it with an Action. The reason the Pipeline table doesn't show up as an option is because you can only add records to a table that the Pipeline table has a relationship with.

    Solution: create a relationship between Pipeline and Pipeline.

    When you do that, Quick Base will warn you that it's unusual to create a relationship with the same table, and it is. But there are cases in which it is appropriate, such as this. The reason is that there is a real-life relationship between the different records in your Pipeline table that is being modeled by this relationship in your app. You described the relationship yourself: renewal opportunities are related to closed/booked opportunities. A closed/booked opportunity should generate a related renewal opportunity.

    After you create the relationship, I would recommend changing the field name from Related Opportunity (or whatever it's called) to Related Original Opportunity, or something along those lines, so it's clear that any record with a value in that field is a renewal that can be traced back to the original opportunity.

    Important warning: 
    be sure to set criteria for the Action so that adding a renewal record doesn't trigger it to add another renewal, and so on infinitely.

    I hope this solution works for you. Let me know if you run into any difficulties.

    Principal | Watkyn LLC
    (954) 900-6690 | www.watkyn.com

    Watkyn LLC

  • 3.  RE: Create New Action In Same Table

    Posted 09-20-2017 21:46
    Similar answer to mine but in fact there is no need to create a relationship.

  • 4.  RE: Create New Action In Same Table

    Posted 09-20-2017 21:52
    I think he's trying to _add _a record though, not _edit _one. Unless I'm mistaken, there has to be a relationship to use actions to add a record to a table.

  • 5.  RE: Create New Action In Same Table

    Posted 09-20-2017 21:54
    That's correct.  Once I've finished editing the current record and "closing" it, I want a new record (or records) created for the out years.
    For instance, a customer buys an annual description of my software in 2017.  That record closes.  Then a NEW record would be creating in the Pipeline Table for the 2018 Renewal (and further if doing multiple).


  • 6.  RE: Create New Action In Same Table

    Posted 09-21-2017 01:19
    Yes, I totally misread the question on my phone.

    But once again I think the QuickBase Engineers were concerned about allowing users to set up looping actions. So it does appear that when you add a record you no longer are offered the choice to add a record of the same table because that could create a looping action.

    I did a quick test by relating a table to itself and that didn�t help. I was still blocked from creating that action.

    I think that this would have to be done with the web hook, which of course are a little more complicated to set up, or else you could have a URL formula button for the user to push which would create the additional records.

  • 7.  RE: Create New Action In Same Table

    Posted 09-21-2017 01:44
    In testing this, I was able to create a same-table relationship and an action that added a record to it, so fingers crossed that this works as described. If not, the webhook solution you mention would be the next best thing.

  • 8.  RE: Create New Action In Same Table

    Posted 09-21-2017 10:58
    Interesting. . I will have to try my test again.

  • 9.  RE: Create New Action In Same Table

    Posted 09-20-2017 21:43
    No problem.

    When it says to edit related records, that�s is really not what it means. Mits just worded that way to help new usesrs.

    It can edit any set of records as define by the matching criterial in a Report Link field.

    As we know, you don't need a Relationship have a Report Link field. You can make one yourself. So make a Reportblink field from the record to itself. Ie match on Record ID# in the left, and on the right side navigate all the way back to your same app, and same table and the same Record ID#.

    So obviously, there is only going to be one matching record, the record you are sitting on.

    Now, be sure in your conditions for firing that you do not create a loop. Because when the Action fires, it is an edit which could cause an action to be fired, which edits the record and triggers the Action to be fired, which edits the record .... you get the idea.

    That in fact is why edit the same record you ar on, was not released as an obvious possibility when that launched Actions a few months ago,. How to prevent many users from making lopping Actions. They willl time out after 10 loops by the way. The max rate is 10 per second and then they max out and throw an error by email.

  • 10.  RE: Create New Action In Same Table

    Posted 09-21-2017 15:48
    If Actions and Webhooks don't work for you, try just making a formula url button that creates the new record via API_AddRecord.

    Your button could do it all.  Change the current record to closed, and create a new.  One click, and it happens right away.

  • 11.  RE: Create New Action In Same Table

    Posted 09-21-2017 16:10
    I agree with Matthew. Then the button(s) can also make the correct number if children. They can be formula URL buttons so no code, really.

  • 12.  RE: Create New Action In Same Table

    Posted 09-21-2017 17:37
    Yep, that works too, as long as there's no danger of someone forgetting to click the button or clicking it multiple times by mistake. The danger of someone forgetting to click the button could be mitigated with a report subscription showing opportunities that don't have related renewal opportunities.