Forum Discussion

ZintJoseph's avatar
ZintJoseph
Qrew Captain
7 years ago

Can you use a single webhook to create multiple records in a child table

I have a series of 14 check boxes, each representing an equipment type. I have a child table of Equipment Schedules under the parent Projects. What I am trying to accomplish is simply checking the boxes for the equipment needed on a project, save and have the enter a single line item for each piece of equipment. I have tried this with Actions and it works but the problem is I have to have 14 individual actions. I also need to relate the project, project type (New Store or Remodel) and enter the equipment description based on the checkbox name.

I am wanting to do this instead of Add New Equipment multiple times.

13 Replies

  • JasonJohnson's avatar
    JasonJohnson
    Qrew Assistant Captain
    You could create a formula text button that could use the api_editrecord to check the box on that record and also use the api_addrecord to add a record with the information you need to the other table. You could even go a bit further and make the button uncheck the box and delete the record. It is a bit complicated at first but easier to master than you think. If you can webhook you can learn this.
     If this is an avenue you want to pursue send me an email. I will give you examples and be able to answer questions.
     
  • Thanks Mark....this worked but as you stated it does put junk in my Equipment Schedule table. I will have to created a webhook or action to delete those....it will fill up pretty fast


  • You should be able to fire a webhook to purge all records where the [related parent] = 0.  You can make a report with that filter and then the API_Purge has a parameter to set the report to follow for the purge.  Be sure to hide that report to no one changes the purge parameters.

    Or you may be able to make that report and then use the "more" button to get at the code which defines the purge parameters and build that into your Webhook.  That would be safer.