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:
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.
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
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
[New INPUT() function --- binding dynamic inputs to a data change action](https://community.appsheet.com/t/new-input-function-binding-dynamic-inputs-to-a-data-change-action/50812) Announcements
SUMMARY: We now have an INPUT(, ) function that can be used to define inputs that are dynamically “bound” to values via user input or via other actions that compose them. This is a beta feature but available for anyone to try. If you run into issues please let us know. As always, we would love your feedback and suggestions. This addresses two popular feature requests: Action: UPDATE EXISTING ROW(s) using values from this row with 92 votes, the top-voted feature request here in the user com…
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 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.
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.