Discussions

Expand all | Collapse all

Copy Records to new table and Delete with automation

  • 1.  Copy Records to new table and Delete with automation

    Posted 12 days ago

    I have a quotes and dealer orders table. When a user creates a quote there is an "order" button.  My goal is to have that sit in their quotes table until they hit order and then that disappears from "quotes" and goes to "Dealer Orders" Table.

    I have an automation set up that copies certain information from that quote (name, address, material information) to the dealers table when the order button is pressed (triggering a field to show "approved", which triggers the automation). 
    After that the automation changes that field back to "sent" rather than approved so the automation doesnt copy over every quote- just the one ordered. 

    Lastly I have an action in the automation that deletes the record that has "sent" in that field. 

    Am I doing that right or is there a different way I should go about this. 

    As of now my automation is triggering and deleting from my quotes table, but it never shows up in my Dealer orders table and gives me an error after the automation is ran. 



    ------------------------------
    Mike Klausing
    ------------------------------


  • 2.  RE: Copy Records to new table and Delete with automation

    Posted 12 days ago
    I think what might be an easier way of doing this for me is to create a filter that filters all quotes and only shows the ones that havent been ordered yet.

    ------------------------------
    Mike Klausing
    ------------------------------



  • 3.  RE: Copy Records to new table and Delete with automation

    Posted 12 days ago
    Edited by Evan Westbrook 12 days ago
    Mike,

    You're on the right track with not wanting to delete the data. How about something like this?

    1. Make sure "Quotes" is related to "Dealer Orders" one to many
    2. Pull in any relevant "Quotes" fields to "Dealers Orders" with Lookup Fields through  [Related Quote]
    3. Update the automation to copy only [Record ID#] on a "Quotes" record to [Related Quote] on a new "Dealer Orders" record
    4. Create a summary field on "Quotes" to count the # of "Dealer Orders" records related to a Quote.
    5. Set up a filter on "Quotes" so that a record is hidden if [# of Dealer Orders] > 0
    Instead of managing adding, moving, and deleting data, you're creating information once and relating one record to another. The parent record is then hidden by virtue of if it has a related child record. This will also make things easier to debug in the event that the Automation fails.

    ------------------------------
    Evan Westbrook
    PRIME Developer
    Harder Mechanical Contractors Inc.
    Portland OR
    ------------------------------



  • 4.  RE: Copy Records to new table and Delete with automation

    Posted 11 days ago
    @Evan Westbrook solution should give you the desired outcome instead of going for deleting the data unless there is a need to do so.

    ------------------------------
    Babi Panjikar
    ------------------------------