Hello,
I am trying to create an expression that will create the initial value of a form field with the last value used on the last formโs entry. Reading through other questions and docs I think the MAXROW with _ROWNUMBER expression would work but I canโt seem to get the syntax correct.
MAXROW("MyTable", "_RowNumber")
Works but the list of values comes from the first column in the table, which is the key column, which is not the column I want.
MAXROW("MyTable", "MyColumn", "_RowNumber")
gives me this error:
Column Name โMyColumnโ in Schema โMyTable_Schemaโ of Column Type โTextโ has an invalid Initial Value of โ=MAXROW(โMyTableโ, โMyColumnโ, โ_RowNumberโ)โ. SELECT has invalid inputs
Basically โMyColumnโ is a list of products. On the form it is set as a dropdown selection. For the forms purpose Product A will be used for the first ten entries and Product B for the next ten, etc. I want to avoid the user having to select Product A from the dropdown every time and have itโs initial value as Product A until Product B is selected in which case the new initial value would be Product B until Product C is selected, and so on. Can someone put me on the right track here?
Solved! Go to Solution.
I have found that using [_THISROW-0] works perfectly. Not sure why I need the -0, but as long as it works. Thanks.
Thanks for the reply. Unfortunately this doesnโt seem to be working. I do not get any errors but the formula doesnโt have any effect on the app. I tried changing [_THISROW] to [_THISROW-1] as I read that was a solution for a similar problem and that does give my form field an initial value, however it seems to be somewhat random, not the last product selected as needed. Here is the exact formula I am using with actual table names if that gives any insight.
LOOKUP( MAX( SELECT(Tally_Details[_ROWNUMBER], ([_THISROW-1].[Product_Name] = [Product_Name]) ) ), "Tally_Details", "_ROWNUMBER", "Product_Name" )
I have found that using [_THISROW-0] works perfectly. Not sure why I need the -0, but as long as it works. Thanks.
User | Count |
---|---|
35 | |
35 | |
28 | |
23 | |
18 |