Autofill Column from previous value, not newly saved one

I am seeking to:
Autofill [Last Recorded Power:] and [Last Recorded Date:] columns with the values from
[Current Power: ] and [Current Date:]
That currently exist prior to saving the form.

In this example, when I change โ€œcurrentโ€ values, the โ€œlastโ€ values need to draw from what was already in the columns, not what I am updating them to.
Video Example:

Current Setup:
3X_b_9_b909dd551f78ca2e3d068fe6ed4bf45784c093fa.png

I hope this makes sense!

Solved Solved
0 12 614
1 ACCEPTED SOLUTION

Please try the following.

Please create two actions by splitting the existing one action into 2.

Action 1 called say โ€œSet Existing Valuesโ€: Set the columns [Last Recorded Power] and [Last Recorded Date] with the existing expressions. Prominence: Do not display

Action 2 called say โ€œSet New Valuesโ€ that set the columns [Current Power:] with INPUT() function and [Current Date;] with TODAY() . Prominence: Do not display

Now create a group action called โ€œUpdate Current Powerโ€ that has constituent actions โ€œSet Existing Valuesโ€ as the first action, followed by โ€œSet New Valuesโ€. The prominence of this action: as you need it.

View solution in original post

12 REPLIES 12

Steve
Platinum 4
Platinum 4

You could try simply re-ordering your expressions so that Last Recorded Power: and Last Recorded Date: are set before Current Power: and Current Date: are set. It may be that simple. I donโ€™t know if itโ€™d work off the top of my head. I suspect it will. If not, try the below.

When a row is modified, either by an action or in a form view, the edits are done to a copy of the row. After he changes are complete, the updated row is saved to the data source, replacing whatever the previous values were. While the changes are being made, the previous values can still be accessed by using expressions that query the table directly.

For Last Recorded Power:, use this expression:

LOOKUP(
  [_THISROW].[_ROWNUMBER],
  "table",
  "_ROWNUMBER",
  "Current Power:"
)

For Last Recorded Date:, use this expression:

LOOKUP(
  [_THISROW].[_ROWNUMBER],
  "table",
  "_ROWNUMBER",
  "Current Date:"
)

In both of the above, replace table with the name of the table.

Hmm, no luck yet. I tried both of those suggestions and it still seems to be behaving the same; filling with the new values instead of the previous ones

Please post screenshots rather than videos.

No problem, sorry about that!



Actually - I do see that the Last Recorded Date: portion is working properly, just not the Last Recorded Power: part

Anyone have any ideas?

To reiterate the issue; When I update the power from the Input() expression, I need the values in current power and current date, to move over to last recorded power and last recorded date. The date is moving over properly, but the power portion is simply overriding both columns.
You can see the example clearly in this video: Recording #174



I have no explanationโ€“Iโ€™d expect it to work. But I have no experience with INPUT(), so the problem might be there.

Attn @praveen

Thanks Steve! I am stumped on this one, and itโ€™s the last thing I need to figure out to finish my project.
I am very much so looking forward to a response from anyone who may be able to assist!

Please try the following.

Please create two actions by splitting the existing one action into 2.

Action 1 called say โ€œSet Existing Valuesโ€: Set the columns [Last Recorded Power] and [Last Recorded Date] with the existing expressions. Prominence: Do not display

Action 2 called say โ€œSet New Valuesโ€ that set the columns [Current Power:] with INPUT() function and [Current Date;] with TODAY() . Prominence: Do not display

Now create a group action called โ€œUpdate Current Powerโ€ that has constituent actions โ€œSet Existing Valuesโ€ as the first action, followed by โ€œSet New Valuesโ€. The prominence of this action: as you need it.

Ahh, didnโ€™t think about splitting them up. Okay, will do! Thank you very much

That did it. Appreciate it!

Hi @Nick_S ,

Very good to know it works as per your requirement now. I may say that the solution is equally made up of initial guidance by @Steve about reordering the actions and his suggested expressions for the last recorded values of the two columns.

So while my final suggestion to split the actions was useful, @Steve 's initial guidance set the resulting solution in the right direction.

Top Labels in this Space