Question on SELECT expression:
I have a task list where the user inputs a task name and upon save, Iโd like the system to update the taskโs โaction_typeโ field to the action_type of the most recent task with the same name. For example: If I input โbuy ice creamโ, the system pulls the action type of the most recent โbuy ice creamโ task.
Based on some reading here, I pulled together this expression:
ANY(SELECT(tasks_user_slice_ALL[name],[_RowNumber]=MAX(
SELECT(tasks_user_slice_ALL[_RowNumber],[name]=[_THISROW].[name]))))
Since ANY is considered a list expression, how do I go about grabbing the single task_action_type text Iโm needing from the list to insert it into the field?
Any help would be great. Thanks
Best way to do this, is with MAXROW expression. Create a virtual column to your table with the app formula =MAXROW(tasks_user_slice_ALL,_rownumber,[action_type]=[_THISROW].[action_type]). It will create a ref type field where the result is the key value. Then you can call the name from that record like [VirtualColumnName].[NAME] in the initial value.
Using the rownumber is possible, but itโs a bad design. Instead of rownumber, you should use the DateTime field in the same way.
User | Count |
---|---|
35 | |
30 | |
30 | |
20 | |
18 |