I want the initial value of a form value to equal the previous value of the adjacent column.
The formula would look like this R[-1]C[1] but this canโt be entered for initial value. How do i do this?
I could create another column which has this value but it seems overkill.
Cheers
Steven
Solved! Go to Solution.
Nice one. This worked just fine. Thanks you very much indeed.
There are [_THISROW_BEFORE]
and [_THISROW_AFTER]
variables. You might see if you can use the [_THISROW_BEFORE].[Adjacent_Column] in the initial value of your problem column.
I have never used these in a Form view, so I am not certain if they are available there.
If that doesnโt work, I donโt see any way you can get around using another column.
I believe these are only available in workflow expressions.
Yeah, I wasnโt sure and didnโt have time to check myself. Maybe a feature request?
Good point! I wasnโt thinking in sheet terms. I was assuming editing of an existing row.
Row and column adjacency really isnโt a thing with AppSheet, so best to reconsider your requirement. It sounds to me that you want the initial value of some columnโletโs call it ColumnAโto come from a different columnโColumnBโof the previous most-recently-added row. Set the Initial value expression for ColumnA to something like this:
ANY(
SELECT(
MyTable[ColumnB],
([_ROWNUMBER] = MAX(MyTable[_ROWNUMBER]))
)
)
[_ROWNUMBER]
refers to a rowโs number in the spreadsheet. Assuming the rows in your spreadsheet are added in chronological order, oldest at the top and newest at the bottom, the newest row will have the highest row number. MyTable[_ROWNUMBER]
(replace MyTable
with the name of your table) gives a list of row numbers in your table.
See also:
Nice one. This worked just fine. Thanks you very much indeed.
This is helpful to me also, Thanks
Can I do some math calculations with this Like ColumnA - ColumnB?
I tried but couldn't do it
Thanks for this
I was stuck at this for so many days
Your solution is perfect and simple
User | Count |
---|---|
14 | |
11 | |
9 | |
7 | |
4 |