Skip to main content
Question

Capture Previous values using Formula URL button & Pipeline

  • October 8, 2025
  • 0 replies
  • 234 views

Forum|alt.badge.img+2

I am looking for a solution that can assign value on click of a button and then saves the record, so that the pipeline can capture the previous values a record.    

I have different formula URL buttons that updates stage (submitted, rejected, approved) and this change is captured in Audit table through pipeline.

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&apptoken=XYZ" 
& "&rid=" & [Record ID#] 
& "&_fid_49=Approved" //Stage = Approved
& "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#] & "&dfid=2&z=" & Rurl())

I also need to capture the current and previous values of fields that were modified when Approved. The above formula did not work because QB saves the record first, then applies the field changes. This means that by the time a pipeline is triggered, the "previous values" are already overwritten.

As an alternative, I excluded fid_49 assignment in the formula, which worked as standard save and updated pipeline to trigger when any of field in the form is modified. This carries the previous values to capture the audit. The problem with this approach is that the pipeline runs every time a record with fields defined in the pipeline is modified and saved either through grid edit or using standard save button.

Please let me know if there is any other solution that I can try.

MarkShnierYou
Forum|alt.badge.img+24

This should be no problem for the pipeline.

Trigger the pipeline based on the status change and the have a create record step to populate the old stage and the new stage.

Initially drag the stage field into both fields on the audit record (old and new values) .

Then edit the box with the </> icon to see the code and insert $prev into the code.

{{a.$prev.Stage}}