Triggering Record Creation on another Table
I am looking to create a formula to achieve the following scenario:
I have one table called clients - self-explanatory list of clients
I have one table called items
I have one table called descriptions. This table references both of the previous tables and stores a record for each item for each client.
What I want to achieve, is when i create a record in items, that it creates a record for each client in the descriptions table.
i.e. if I add Item #5 to the item table, I want to trigger a record creating in the description table for client 1 | item 5, client 2 | item 5, client 3 | item 5
I am assuming that I could create a formular to trigger on create/update.
Can someone assist me on what this formular would look like
1 reply
-
“Trigger on create” in the “items” table indeed:
let Zitem := this;
for Zclient in select clients do
let Zdesc := (create descriptions);
Zdesc.(clients := Zclient);
Zdesc.(items := Zitem)
end
Content aside
- 4 yrs agoLast active
- 1Replies
- 473Views