Forum Discussion

QuickbasePipeli's avatar
Qrew Member
3 years ago

Pipelines - how to look at original value and new value of field? (Quickbase Pipelines)

I have a pipeline that updates a related field based on new data that is entered. I was wondering if there was a way for me to to keep the original data for tracking purposes. I saw that placing $prev in front of the field value would do the trick, however that's not working. 

Right now I have 3 fields a Current field (which is the current data point), New field (data point that is being updated, which will in turn update the current field once saved), and Old field (field that should capture the data point prior to save"previous" data point prior to save).

I currently have this conditional formula in the old title field of my pipeline - however I am still receiving errors.

{% if a.$current_field %}{{ a.$current_field}} {%endif%}

Anyone know if I'm missing anything?

Quickbase Pipelines

1 Reply

  • You could do something like this:

    {%- set audit_list = [("field one name" ,a.fieldone, a.$prev.fieldone),("field two name" ,a.fieldtwo, a.$prev.fieldtwo),("field three name" ,a.fieldthree, a.$prev.fieldthree)] -%}

    {% for i in audit_list -%}
    {% if i[1] != i[2] %}
    Field Changed: {{i[0]}}
    --- New Value: {{i[1]}}
    --- Old Value: {{i[2]}}

    {% endif %}
    {%- endfor %}

    Sean Connaughton