I have 1 form that, upon creation of a new record, needs to create records in several tables. I'll give a simplified example:
New CallLog Record creates:
New Client record
New Pet record
New Visit record
The problem is that the Pet is a child of the Client and the Visit is a child of the Pet and the Client (using autonumber primary key in the parent and integer foreign key in the child). The CallLog record is a parent to all three for lookup purposes.
I created a triggered action with 3 insert blocks to create these three entries. However, it looks like the triggered action must be asynchronous because sometimes the child is able to grab the primary key from the parent and other times it is blank (indicating the parent hasn't been created yet). I don't know what the ID for the parent will be until after it is created.
The obvious solution is to create the first parent record then trigger the child to be created from there (as a triggered action on, say, the Client table rather than the CallLog table). However, Caspio doesn't allow nesting of triggered actions so an error is produced.
My current solution is a terrible and very fragile cascade of datapages that is autocompleted and autosubmitted and redirected to the next one as my user sits with infinite patience and tries not to hit the browser's back button. I can hardly stand it and I built it. I'm 100% sure my users will not tolerate.
I've racked my brain for a way to solve this problem. Any ideas?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Casey
I have 1 form that, upon creation of a new record, needs to create records in several tables. I'll give a simplified example:
New CallLog Record creates:
New Client record
New Pet record
New Visit record
The problem is that the Pet is a child of the Client and the Visit is a child of the Pet and the Client (using autonumber primary key in the parent and integer foreign key in the child). The CallLog record is a parent to all three for lookup purposes.
I created a triggered action with 3 insert blocks to create these three entries. However, it looks like the triggered action must be asynchronous because sometimes the child is able to grab the primary key from the parent and other times it is blank (indicating the parent hasn't been created yet). I don't know what the ID for the parent will be until after it is created.
The obvious solution is to create the first parent record then trigger the child to be created from there (as a triggered action on, say, the Client table rather than the CallLog table). However, Caspio doesn't allow nesting of triggered actions so an error is produced.
My current solution is a terrible and very fragile cascade of datapages that is autocompleted and autosubmitted and redirected to the next one as my user sits with infinite patience and tries not to hit the browser's back button. I can hardly stand it and I built it. I'm 100% sure my users will not tolerate.
I've racked my brain for a way to solve this problem. Any ideas?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.