issues with a!sortInfo() function

Certified Associate Developer

Hello All,

 

I have a requirement to sort the cdt on the basis of FormOrder column. I used the a!sortInfo() function to get the sorting done. The issue i'm facing here is related to single digit number. For example

Scenario 1: Lets assume FormOrder consists od below values

40

50

10

20

60

Now, If i use this function the sorting working as per the expectations and the result displayed in below order(Which is perfectly fine)

10

20

40 

50 

60

 

Scenario 2: Lets assume the formorder has below values

40

50

1

20

60

Then It will not into consideration the value which is in single digit and the result would be like

20

40

1

50 

60

Can someone please tell me why exactly its happening? Below is the code I have used

 

local!sortedData_cdt:cast(
typeof(local!groupedData_cdt),
todatasubset(
local!groupedData_cdt,
a!pagingInfo(
startIndex: 1,
batchSize: -1,
sort:a!sortInfo(
field:"FormOrder",
ascending:true
)
)
).data
),

  Discussion posts and replies are publicly visible

Parents Reply Children