Sorting Issue and filter

Sorting Issue and filter

  

Hello OutSystem Team,

In aggregate sorting first sorting is below,

                      1. Am using Editable table for my screen. If i create a record it should become a first row for that am using  dynamic sort created date(Descending) - It is working.

 but filter is not working when i click on column name

SyntaxEditor Code Snippet

List_SortColumn_GetOrderBy(SomeMasterTable.Id, "{SomeMaster}.[Id]")


Can you give me the solution for both should work.


Thanks,

Saravana.


Hello Saravana.

The Richwidget List_SortColumn works only in TableRecords, if I am not mistaken, as it expects to be inside one.

You can try to use this one here, as it works on List Records and should work on Editable Tables as well, as you need to pass the table Id.

https://www.outsystems.com/forge/component/2671/list-record-sort/

Cheers

Eduardo Jauch wrote:

Hello Saravana.

The Richwidget List_SortColumn works only in TableRecords, if I am not mistaken, as it expects to be inside one.

You can try to use this one here, as it works on List Records and should work on Editable Tables as well, as you need to pass the table Id.

https://www.outsystems.com/forge/component/2671/list-record-sort/

Cheers

Thank you for your reply Eduardo,


 based on your suggestion,I have tried the component on the editable records and the sorting.
I am attempting to implement both Dynamic Sort where the user can sort by column in runtime and
Also sorting should happen on the createdOn  Column so the new record is placed in the first row.

I have attempted to call the ListRecord_SortColumn_SetOrderBy after a new record is added.I suspect
the default sort is getting applied after the new record is added.

I am not sure if this is possibe to do with a editable record list.
Would be grateful if you could point me in the right direction
 I am attaching the OML for reference if needed.


Thanks,

saravana


Hi Saravana.

Didn't have much time to look to your OML.
But I saw something that seems wrong.

The ListRecord_Sort should come BEFORE the Refresh of the aggregate and Table.

Maybe this solves the problem.
If not, I'll try to look more carefully later.

Cheers.

Eduardo Jauch wrote:

Hi Saravana.

Didn't have much time to look to your OML.
But I saw something that seems wrong.

The ListRecord_Sort should come BEFORE the Refresh of the aggregate and Table.

Maybe this solves the problem.
If not, I'll try to look more carefully later.

Cheers.


Hello Eduardo, 

                             Thank for your quick response. I have tried your suggestion but its not working. Can you once again  look in to that and give me the solution what we are expecting. Meanwhile am also doing to achieve that.

Thanks,

saravana.



Hello Saravana,

I opened your module, and inside StudentSave action I did what Eduardo posted on the picture (ListRecord Sort before the query refresh and ajax refresh). Then, you need to change your dynamic sort on the aggregate that is on preparation to be: 

ListRecord_SortColumn_GetOrderBy(StudentMasterTable.Id,"{Students}.[Name]")

You need to use the function that is on List Record sort module).

Finally, you need to change the widget that you are using on the screen to sort, to the one that is on list record sort module.

You can test here: 

https://emanuelfreitas.outsystemscloud.com/Sorting/Home.aspx


Inside StudentSave:


On screen: 


EFreitas wrote:

Hello Saravana,

I opened your module, and inside StudentSave action I did what Eduardo posted on the picture (ListRecord Sort before the query refresh and ajax refresh). Then, you need to change your dynamic sort on the aggregate that is on preparation to be: 

ListRecord_SortColumn_GetOrderBy(StudentMasterTable.Id,"{Students}.[Name]")

You need to use the function that is on List Record sort module).

Finally, you need to change the widget that you are using on the screen to sort, to the one that is on list record sort module.

You can test here: 

https://emanuelfreitas.outsystemscloud.com/Sorting/Home.aspx


Inside StudentSave:


On screen: 


Hello EFreitas,

                  Thank you for reply,

                    I have tried your suggestion with one column it's working fine. I was try to apply multiple column. It is not working. Can you tell me how to achieve that.

Thanks,

Saravana.


Saravana Kumar Sivaraj wrote:

EFreitas wrote:

Hello Saravana,

I opened your module, and inside StudentSave action I did what Eduardo posted on the picture (ListRecord Sort before the query refresh and ajax refresh). Then, you need to change your dynamic sort on the aggregate that is on preparation to be: 

ListRecord_SortColumn_GetOrderBy(StudentMasterTable.Id,"{Students}.[Name]")

You need to use the function that is on List Record sort module).

Finally, you need to change the widget that you are using on the screen to sort, to the one that is on list record sort module.

You can test here: 

https://emanuelfreitas.outsystemscloud.com/Sorting/Home.aspx


Inside StudentSave:


On screen: 


Hello EFreitas,

                  Thank you for reply,

                    I have tried your suggestion with one column it's working fine. I was try to apply multiple column. It is not working. Can you tell me how to achieve that.

Thanks,

Saravana.



Hello Saravana,

It's important to use the methods from the component, not mixing with the Richwidgets methods, as this would make the ordering fail. THe component is a replace to the Richwidgets List_SortColumn.

Regarding "multiple columns", I'm not sure what do you mean.
The dynamic sort (both Richwidgets and this component) can dynamically order by a single column. You can chose the column, but you can't order by more than one column at the same time. 

Is this what you're trying to achieve? 

If so, you will have to develp the code to do this (would be a nice component, I think).

Cheers.

Hi,

Where you able to solve this problem?
Do you need further assistence?

If an answer solved your question or helped solve it, please, mark it as the Solution to your question.

Cheers.