cancel
Showing results for 
Search instead for 
Did you mean: 

How to reorder a custom collection using script.

Former Member
0 Kudos
133

Let say I have a collection "ABC_T" in a Project which has two column Line No & Data.

Table: ABC_T

Line NoData
1Data 1
2

Data 2

3Data 3
4Data 4

I want to sort the table based on the 1st column line no in descending order. So the document should look like below when a user click on save.

Line NoData
4Data 4
3

Data 3

2Data 2
1Data 1

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pawan,

Custom Collection comes with a button called "Reorder List" where you can order the rows manually.

If you want to do through script then you need to copy all data into a HashMap or any other temporaray array.Sort it and create the collection newly by deleting the old entries.

Hope this works.

Thanks & Regards,

Rajiv Yadav.