Question on SELECT expression: I have a task...

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

0 1 333
1 REPLY 1

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.

Top Labels in this Space