Forum Discussion

AaronAlpert1's avatar
AaronAlpert1
Qrew Member
3 years ago

Pipeline - which field caused the trigger?

Right now, I have a table, call it "Issues." There is a Pipeline that is triggered when any field is updated in an Issues record; this creates a new record in the "Edits" table, and Last Modified By and Date Modified are written to this new "Edit" record.

What I want to do is find out which field (or fields) caused the Pipeline to trigger. For example, in the "Issue" record, did the user change the value in the Status field or the Next Step field? Or both? I know I can use $prev to access the value before the edit (and ultimately I want to store this in the Edit record). Is there a way to access the name or fid of the field(s) that changed and triggered the pipeline?

------------------------------
Aaron Alpert
------------------------------

1 Reply

  • @Aaron Alpert

    I don't believe there is a direct way to access the trigger information, but something like this would work (even if it's not pretty)...

    Say the possible triggers are fid 6 "Status", fid 7 "Start Date", and fid 8 "Related Project".

    {% set s = '6' if a.status != a.$prev.status %}
    {% set d = '7' if a.start != a.$prev.start %}
    {% set p = '8' if a.related_project != a.$prev.related_project %}
    {{([s,d,p]|select("defined"))|list|join(', ')}}

    If the pipeline was triggered by a change in the Start Date and the Related Project, the result would be 7, 8.

    Let me know if this was helpful 👍

    -Sharon

    ------------------------------
    Quick Base Junkie
    ------------------------------