List_ColumnSort

  


Is it possible to pass "{Entity}.[Attribute]DESC" to List_ColumnSort richwidget and set same in aggregate

as

SyntaxEditor Code Snippet

List_SortColumn_GetOrderBy(BookingTable.Id,"{Booking}.[CheckInDate]DESC")

 ?

I have done this but it is giving me an error. And also tell me If both static and dynamic sort applied then how it work?

Hi Lovish

I suggest you to do the Online Training or take a Live class, as this question is answered there.

The List_ColumnSort needs the name of the column, without DESC or ASC, as this will be managed internally (first time you click a column it will be ASC, after you click the sorted column again, it will be DESC).

List_SortColumn_GetOrderBy can be used ONLY in Dynamic Sort.
And you must have a space between the name of the column and DESC, if I'm not wrong.

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Hi Lovish

I suggest you to do the Online Training or take a Live class, as this question is answered there.

The List_ColumnSort needs the name of the column, without DESC or ASC, as this will be managed internally (first time you click a column it will be ASC, after you click the sorted column again, it will be DESC).

List_SortColumn_GetOrderBy can be used ONLY in Dynamic Sort.
And you must have a space between the name of the column and DESC, if I'm not wrong.

Cheers,
Eduardo Jauch

Thanks Eduardo for your valuable time and yes i am going through online too but i want to clear my doubt more specifically . 

I got the point , But  i want to know that  both sort and dynamic sort can be applied? if yes then the order is from top to bottom ? 


Hello Lovish,

Yes, you can mix sort and dynamic sort. In the end, they will be just columns in sequence in a Order By statement sent to the database.

And yes, as is in SQL, the first one is used to sort, than, if this column has repeated values, the second one is used and so on. 

Cheers and good learning! :)
Eduardo Jauch

Eduardo Jauch wrote:

Hello Lovish,

Yes, you can mix sort and dynamic sort. In the end, they will be just columns in sequence in a Order By statement sent to the database.

And yes, as is in SQL, the first one is used to sort, than, if this column has repeated values, the second one is used and so on. 

Cheers and good learning! :)
Eduardo Jauch


Thanks Ed. I know some of my questions are silly but as a new comer , i have to ask them to make my base strong.

Hi Lovish,

There are no silly questions.
And a strong base is the best way to become a strong programer.

Said that, is important to try to understand by yourself first. Doing tests is a good way to learn what works and what don't.

Than, if any question still exists, it is always better to ask. It is the OutSystems way: Ask why! ;)

Cheers,
Eduardo Jauch