customsort
Reactive icon

CustomSort

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 28 July 2023
 by 
0.0
 (0 ratings)
customsort

CustomSort

Details
A custom sort attribute is a set of criteria used to order or arrange items in a specific way, tailored to meet unique requirements or preferences. When dealing with multiple custom sort attributes, it means that the items are sorted based on multiple distinct characteristics, with each attribute contributing to the final sorting order.
Read more

Custom sorting with multiple columns refers to the process of arranging data in a table or dataset based on multiple criteria in a user-defined order. Instead of using a default sorting method, you specify your own rules for sorting data based on different columns in a particular sequence. This type of sorting is commonly used in various applications and programming scenarios to organize data in a more meaningful way.

Let's take an example of a dataset with information about employees:

NameAgeDepartmentSalary
John30Engineering60000
Jane28Marketing55000
Alex35Engineering62000
Emily32HR58000
Michael32Marketing57000

Now, let's say you want to sort this data based on multiple columns, in a specific order:

  1. Sort by Department (in ascending order).
  2. Within each department, sort by Age (in descending order).
  3. Within each department and age group, sort by Salary (in descending order).

After applying this custom sort, the data would look like:

NameAgeDepartmentSalary
Alex35Engineering62000
John30Engineering60000
Emily32HR58000
Michael32Marketing57000
Jane28Marketing55000

In this custom sort, employees are first grouped by their departments. Within each department, employees are then sorted based on their age in descending order, and within each age group, employees are sorted by their salary in descending order.

Custom sorting with multiple columns is beneficial in situations where the default sorting algorithms do not produce the desired arrangement of data. It allows you to prioritize different aspects of the data and make the resulting order more meaningful and relevant to your specific use case. This can be done in various programming languages or spreadsheet applications by implementing custom comparison functions or using built-in functions that support multiple column sorting.

Release notes (1.0.0)
License (1.0.0)
Reviews (0)
Team
Other assets in this category