DanielJohnson2
4 years agoQrew Trainee
Get field from different records in the same table, related to parent?
Hi All,
I'm trying to create an audit log with Pipelines with the intention of tracking how long a record is in each particular status and thought using {{a.$prev.updated_at}} would work to record the last time the status was changed. I have a Pipeline in place now that creates a record in a child table every time a specific multiple choice field is changed. However, {{a.$prev.updated_at}} isn't sufficient because someone might go in and add a note to the record, or attach a file to it, or any number of things that don't have to do with the multiple choice (in this case production status) field in question. My understanding is anytime the record is saved that time is logged in {{a.updated_at}}. When the Pipeline fires it also records the Record ID of the parent record that's having its status changed. My goal is to get the time between status changes in that child table. How can I do that? Is there a solution in relating the child table to itself? Another Pipeline? Is it even possible? Is there a more complex bit of language like $prev where I can say {{a.$prev.updated_at}} only for instances where that specific field changed?
Thanks.
------------------------------
Daniel
------------------------------
I'm trying to create an audit log with Pipelines with the intention of tracking how long a record is in each particular status and thought using {{a.$prev.updated_at}} would work to record the last time the status was changed. I have a Pipeline in place now that creates a record in a child table every time a specific multiple choice field is changed. However, {{a.$prev.updated_at}} isn't sufficient because someone might go in and add a note to the record, or attach a file to it, or any number of things that don't have to do with the multiple choice (in this case production status) field in question. My understanding is anytime the record is saved that time is logged in {{a.updated_at}}. When the Pipeline fires it also records the Record ID of the parent record that's having its status changed. My goal is to get the time between status changes in that child table. How can I do that? Is there a solution in relating the child table to itself? Another Pipeline? Is it even possible? Is there a more complex bit of language like $prev where I can say {{a.$prev.updated_at}} only for instances where that specific field changed?
Thanks.
------------------------------
Daniel
------------------------------