cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gilbert_Wong
New Member

What're the differences between SortOrder(s) and SortOrderTable in the function "SortByColumns"?

1 ACCEPTED SOLUTION

Accepted Solutions

The SortOder has do do with Ascending or Descending.

 

With SortOrderTable, you specify a Table or range of values in which the ordering should be done.

For instance: SortByColumns(MyFirstList,"ID",[8,3,5])

This Sorts the ID Column by 8 followed by 3 then 5 based on the numbers in the ID Column.
 
With SortByColumns(MyFirstList,"ID",[1,3,5]) , ID 1 will be listed first followed by 3 then 5 before the other IDs will follow in that order.
 
When that is not specified, Ascending order will be 1,2,3,4,5,6,7,8.
 
So it gives you another way of customizing the manner in which the sorting should follow.
 
That is my understanding. hope it makes sense
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

View solution in original post

3 REPLIES 3
eka24
Super User III
Super User III

SortByColumns as the name implies makes it possible to sort with multiple columns at the same time.

Example:

SortByColumns(MyFirstList,"ID","Column2","Column3") in that order. Thus sorting is done by String
 
Sort on the other hand would be:
Sort(MyFirstList,ID)
 
Note the Sort is not in quotes ""
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

It seems that you did not answer me the differences between SortOrder(s) and SortOrderTable.🤔

Could you please talk more about this?

The SortOder has do do with Ascending or Descending.

 

With SortOrderTable, you specify a Table or range of values in which the ordering should be done.

For instance: SortByColumns(MyFirstList,"ID",[8,3,5])

This Sorts the ID Column by 8 followed by 3 then 5 based on the numbers in the ID Column.
 
With SortByColumns(MyFirstList,"ID",[1,3,5]) , ID 1 will be listed first followed by 3 then 5 before the other IDs will follow in that order.
 
When that is not specified, Ascending order will be 1,2,3,4,5,6,7,8.
 
So it gives you another way of customizing the manner in which the sorting should follow.
 
That is my understanding. hope it makes sense
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (63,716)