591
Views
6
Comments
Reactive Apps - How to reset table Sort
Question

Hi there,


I am testing the new Reactive Web Apps and i came across this scenario, imagine that i implement a table and i click on a column to sort it:



And then i want to implement a button to Reset the current column sorting so i can have the default (unsorted) view again.

How can i do this in the new Reactive Web Apps? I don't see any action to reset a sort of a table, and i don't see that pattern implemented when i scaffold entities either.

Thanks.

Nuno Guedes

2023-09-28 14-21-55
Daryna Kravets

Hi Nuno,

Default sorting is a sorting by Id. So you can add button with logic that sets sorting by Id column.

2019-11-11 19-10-00
Nuno Guedes

Daryna Kravets wrote:

Hi Nuno,

Default sorting is a sorting by Id. So you can add button with logic that sets sorting by Id column.

Hi Daryana,


I can manipulate the data that way that you ar saying, but the problem is that the column highlight does not disappear in the UI:



What i want to know is if there is a way to visually reset the highlight of the sort on the table column that was clicked by the user, in the UI itself.


2026-02-26 06-29-24
Rahul
 
MVP

Hi Nuno,

On the table header their is option only for shot column order by ASC and DESC.

If you want reset the shorting you need to put additional button on page and write you own logic.


Else you have to modify you short logic like below step-

1. take one additional column for reset shorthing

2.take one inpput paramete isReset in short action

3.check if IsReste is true then reset table shorting else put order by logic.


Hope this will help you.

Regards

Rahul Sahu

2019-11-11 19-10-00
Nuno Guedes

Hello Rahul,

Thanks for your answer, i am not sure if i understood your suggestion, but from what i understood, you suggested that i implementa a fully custom header solution instead of using the Sort Attribute of the header Column.


If that is the case, i already thought of that and i'm sure that a fully custom solution would work, but i find hard to believe that there is no easier way to do it in this awesome platform :).

Even in traditional Web we have the List_Navigation_ResetStartIndex in the RichWidgets eSpace to do the trick. In reactive apps there is no equivalent to this action?

Thanks.

Nuno Guedes

2024-10-23 18-08-37
António Figueiredo

Hi Nuno,

I know this is an old post, but might be useful for next visitors.

To reset the sort attribute you only have to assign "{table}.[attribute] DESC" to the sort screen variable you are using on the Aggregate dynamic sort.
If you want to set your own default just do this assign on the screen event "On Initialize".

2019-11-11 19-10-00
Nuno Guedes

Hi Antonio,

I have already tried that, and it works fine datawise, but like i mentioned in the beginning of the post, although you can do it datawise fairy easy, the UI does not get updated, hence although your data renders correctly, in the UI you will see the old column header highlighted, like this:

That is the point of my question, how can we change the UI of the highlighted sorted column in a table if we want to programmatically reset the sorting?

Of course we can use all javascript stuff to do it, however i was hoping to have a clean OutSystems way to achieve it :)

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