Sorting by two fields (OrderBY)

I am looking to sort by two fields, NumNote and Payment_Type.

When I do the order by with only one field, I have no problem ๐Ÿ˜„, but when I integrate the second one it doesn't work and I don't understand why๐Ÿ˜ฃ ; any idea what I'm doing wrong? This is the instruction that I use

<<Start:ORDERBY(FILTER("Notes",AND([Service_Type]=[_THISROW-2].[Service_Type],[Payment_Type]=[_THISROW-1].[Payment_Type],[Date_Input]>=[FromDate],[Date_Input]<=[ToDate])),[Note_Number],[Payment_Type],true )>><<[Note_Number]>>

Thank you very much!!!

Solved Solved
1 6 295
1 ACCEPTED SOLUTION

How is it NOT working?

One thing to watch out for is that when you use a reference field in the expression, the key value is used instead of the label that you see in UX (i.e. customer id, customer name)  unless you de-reference it.

 Both caterory_id and subc_id are references and unless you de-reference them you get a result that is different from what you see in the table view (where it is sorted by category_id only)

TeeSee1_3-1668208356527.png

TeeSee1_1-1668208244683.pngTeeSee1_2-1668208261661.png

View solution in original post

6 REPLIES 6
Top Labels in this Space