Forum Discussion
DanieGrabe
6 years agoQrew Trainee
Hi Zimil,
I have one solution that wil work for you.
Create a new child table for your ticket table. To account for the current state, create a record in the child table for every ticket and dump the related ticket record id, current value of party and todays date (starting point). Also update the parent records with the record ID of the current child record you created.
Then write a webhook on the party field that fires when that field changes, looking at the old value of the party field to insert an end date in the child record we created above - using the record ID you stored in the parent record.
Another webhook can create a new child record with start date for the new party. Remember to store the record id of the new child record in the parent table.
You can then do a summary report, grouping by ticket ID and party to see duration (simple date calculation) by ticket and party.
I have one solution that wil work for you.
Create a new child table for your ticket table. To account for the current state, create a record in the child table for every ticket and dump the related ticket record id, current value of party and todays date (starting point). Also update the parent records with the record ID of the current child record you created.
Then write a webhook on the party field that fires when that field changes, looking at the old value of the party field to insert an end date in the child record we created above - using the record ID you stored in the parent record.
Another webhook can create a new child record with start date for the new party. Remember to store the record id of the new child record in the parent table.
You can then do a summary report, grouping by ticket ID and party to see duration (simple date calculation) by ticket and party.