Hi,
I am working on traditional web application where i am using TableRecords, RichWidgets\List_SortColumn, RichWidgets\List_Navigation widgets and in preparation i am using a sql to fetch the data which is source to TableRecords widget and in sql i have add a simple sql querie,
"Order BY @OrderBy" with this querie i can sort the table.
But i cant achieve multiple column sort.
Please help me with this issue.
Thank you.
Hi @nani
Please find the attached OAP file.
I hope current solution will work for you.
Hope this document for dynamic sorting on SQL query will help you.
Regards,
Wasimkhan S
Maybe this topic will help you:https://www.outsystems.com/forums/discussion/92027/order-table-by-2-or-more-columns/
Hi @nani , Can you check if the below screenshot works for you and make sure you are passing properly formed input for sorting.
Hi Nani,
Please check the attached screenshot that might help you to solve the problem.In below screenshot I have wrote the query and created 1 input parameter as Expand Inline is "Yes"In below Screenshot I am passing the value of Input parameter "Sorting" valueRichwidget already have the function called List_SortColumn_GetOrderBy. It takes 2 input, the id of the table and default column to sort. so when you try to sort the column on the table it automatically take that column and pass to the query.
I hope above solution will help you.
Hi, thank you for you time but i haven't found any solution.what you are posting a dynamic sorting which i have already achieve i need a multiple sort.
SQL query ORDER BY @OrderBy
Old Parameter values OrderBy = {User}.[Id] ASC or {User}.[Name] Desc ..ect.., if i use this "List_SortColumn_GetOrderBy " function it can be only one.
But i need multiple order at some time
Required parameter value OrderBy = {User}.[Id] ASC, {User}.[Name] Desc, {User}.[Username] ASC
if i click on username column OrderBy value should change to
= {User}.[Id] ASC, {User}.[Name] Desc, {User}.[Username] DESC
I hope you guys understand what i need.
Hi, Milind.
It working great matching my requirements, i am also trying to implement but you have completed first.
Thank you, for your time and support.