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
Syntax
ORDERBY( row-keys , sort-key [ , descending-order? [ , sort-key ] ]… )
So the function sorts the row keys.
2 Likes
Suvrutt_Gurjar:
Sys_ID]
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