RichardPfister
8 years agoQrew Cadet
Webhook to Create table AND copy records into new table
Sorry if this is a n00b question but I can't seem to figure it out. I want to create a webhook to Create a Table (figured that part out) and then add records to the new Table. I don't know how to write an AddRecord webhook with the dbid of a Table that hasn't been created yet. I don't think I can combine them into one webhook, but if I don't, I can't see how to prioritize the webhooks to ensure that the CreateTable happens before the AddRecord.
Some context:
I have a master table of events that occur on varying frequencies (daily, monthly, quarterly, etc.). I also have a table for generating new tables, where my user will select a Month & Year and click save. The webhook is on this table and triggered when the record is saved. So when the user selects August 2017 and clicks save, I want the webhook(s) to create a new table called August 2017 and copy all records from the Master Table that pertinent to August 2017 (daily=yes, monthly=yes, quarterly=no, etc.). I've got lots of plans for helper fields to identify which are the correct records to copy/add, but I can't seem to get the basic Create-then-Copy flow figured out. Can anyone suggest an approach or show me what I'm missing please?
Some context:
I have a master table of events that occur on varying frequencies (daily, monthly, quarterly, etc.). I also have a table for generating new tables, where my user will select a Month & Year and click save. The webhook is on this table and triggered when the record is saved. So when the user selects August 2017 and clicks save, I want the webhook(s) to create a new table called August 2017 and copy all records from the Master Table that pertinent to August 2017 (daily=yes, monthly=yes, quarterly=no, etc.). I've got lots of plans for helper fields to identify which are the correct records to copy/add, but I can't seem to get the basic Create-then-Copy flow figured out. Can anyone suggest an approach or show me what I'm missing please?