I am using the below code to sort the date column first and then the number column next but with different ascending,
It does not bring the correct result but not showing any error, below is full code I am using in the default value of the gallery.
Kindly advise, my sort order code is correctly written or should be modified
(it is possible to write multi column sort in one line by comma with different order, as my code has to arrange the data sorting twice)
LookUp(
SortByColumns(
SortByColumns(
colAllWarranty,
"cr333_claimdate",
SortOrder.Descending
),
"cr333_claimno",
SortOrder.Ascending),
(Len(TypeModel_1.Value) = 0 || TypeModel_1.Value in MachineModel) &&
(Len(TypeSerial_1.Value) = 0 || TypeSerial_1.Value in MachineSerial) &&
(Len(TypeClaimNo.Value) = 0 || TypeClaimNo.Value in ClaimNo) &&
(Len(TypeJobDesc_1.Value) = 0 || TypeJobDesc_1.Value in FailureDetails || TypeJobDesc_1.Value in OtherDetails) &&
(
(DateValue(ClaimDate) >= If(IsBlank(DeliverFromDate_2.Value), DatePicker3_2.Value, DeliverFromDate_2.Value)) &&
(DateValue(ClaimDate) <= If(IsBlank(DeliverDateTo_2.Value), DatePicker3_3.Value, DeliverDateTo_2.Value))
)
)
Note : the lookup method is been used in my code so that every time and every filter - the first record to be selected. Till I was applying only sort by date, it was working fine - The filter was getting applied and was always selecting the first record ,
BUT when I added another column for sort, the problem starter of not bring the correct result