Iโm creating a new application, and iโve got this error message
ORDERBY(SELECT(System[Sys_Label],AND([Sys_Type]=โTYPEFICHEโ,[Sys_Actif_B]=true),true), [Sys_Tri])
In table System the column Sys_Tri is present
AppSheet knows this colum because it is displayed :
What is strange is there is no error for this expression
No error for the Sys_Label column, So AppSheet knows the column Sys_Label
And when i add the Order By clause with this column
ORDERBY(SELECT(System[Sys_Label],AND([Sys_Type]=โTYPEFICHEโ,[Sys_Actif_B]=true),true),[Sys_Label])
Iโve got the error message !!
You seem to be constructing the ORDERBY() expression based on a non key column.
The ORDERBY() function is used to sort row references. So you may test the same expression by using [Sys_ID] instead of [Sys_Label]
ORDERBY(SELECT(System [Sys_ID],AND([Sys_Type]=โTYPEFICHEโ,[Sys_Actif_B]=true),true), [Sys_Tri])
Edit : From the article , the syntax of the ORDERBY() expression is
ORDERBY( row-keys , sort-key [ , descending-order? [ , sort-key ] ]โฆ )
So the function sorts the row keys.
yes it works with Sys_ID no error
but i wanted to store the Value of Sys_ID in the field, and to display the user Sys_Label
i will try with a Ref
User | Count |
---|---|
39 | |
32 | |
30 | |
16 | |
14 |