144
Views
11
Comments
Solved
How to do sorting in traditional web app the value of list in local variable
Application Type
Traditional Web

Hi team 

i having doubt to do that sorting in traditional web app basically the list not from entity its from other source like api i am stored it an one local variable.

now i need to do that sorting for your reference i have attached my oml 

EMS_UI traditional.oml
2024-04-05 19-22-12
João Sousa
Solution

Yes. 

Nevertheless you are mapping it to a list and fecthing directly from your IS if I'm not mistaken, and then using it to map your table, so it should be fine.

Consider sorting the local list aswell (in attach).

Hope it helps =)

João


EMS_UI traditional.oml
2024-04-05 19-22-12
João Sousa

Hi there,

Have you consider using the system action List Sort?

Please find the doccumentation bellow:

https://success.outsystems.com/documentation/11/reference/outsystems_apis/system_actions/#ListSort

Also, you can check the forum like this thread for additional information:
https://www.outsystems.com/forums/discussion/72490/sorting-a-entire-table-using-a-list/

Hope it helps,

João

 

2023-07-17 04-42-12
Karthick Balaji

even i am using the system side server action of list sort only but its not working 

i am using traditional web app

2024-04-05 19-22-12
João Sousa

Hi there,

One approach and since you are doing your manual sorting apart from the richwidgets wb, you could have some logic that allow to sort the list by the selected column, as well as an input parameter to your sorting action to know wich column to sort and if it should display the output in ascending or descending manner (the boolean and third input parameter of the list sort system action)

You can just link it to the sorting action selected. In your the list will only be sorted by name and ascending.

Hope it helps,

João

2024-04-05 19-22-12
João Sousa

Hi @karthick B,

Find attached the approach I was saying in your oml. Please check the sorting action and if it works, since I hadn't dependencies to test.

Hope it helps,

Regards

EMS_UI traditional.oml
2023-07-17 04-42-12
Karthick Balaji

Nope its not working


 thanks for time 

2024-04-05 19-22-12
João Sousa

can you try now? i had a missing assign, sorry bout that. If that doesn't work try a link to the sort action instead.

Hope it helps

EMS_UI traditional.oml
2023-07-17 04-42-12
Karthick Balaji

generally the details are comes from api 

2024-04-05 19-22-12
João Sousa
Solution

Yes. 

Nevertheless you are mapping it to a list and fecthing directly from your IS if I'm not mistaken, and then using it to map your table, so it should be fine.

Consider sorting the local list aswell (in attach).

Hope it helps =)

João


EMS_UI traditional.oml
2023-07-17 04-42-12
Karthick Balaji
2024-04-05 19-22-12
João Sousa
2024-09-12 02-43-38
Deepsagar Dubey

Hi @karthick B 

I am using ListSort server action to sort the list, Like this - 


If you using this list in any widget like Dropdown or table then you need to refresh the widget as well then it'll show the sorted list.

I hope it'll help you,

Thanks

Deep

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.