Exago .NET API Documentation
SortAndGroupByFormula Property
WebReports.Api.Reports Namespace > EntityColumnMetadata Class : SortAndGroupByFormula Property

Specify a custom formula by which columns should be sorted and grouped by the application.

This field allows admins to specify how columns should be sorted and grouped by the application. By default, Exago will sort (and group) columns based on the data in the column. You can use this metadata field to specify different data by which the column should be sorted.

For example, you may have a custom column Employees.FullName like the following:

{Employees.FirstName} & ' ' & {Employees.LastName}

By default, Exago would sort this field on the full string. You may want to sort on just the LastName, instead. In Sort and Group-By Value, enter {Employees.LastName}, and the column will sort on LastName.

Another common example is sorting a Month field by the numeric representation of the month instead of the name. Since this value accepts any valid Exago formula (except aggregates), custom functions can also be used.

Syntax
public System.string SortAndGroupByFormula {get; set;}

Property Value

A valid Exago formula.
Remarks

The Sort and Group-By Value field must have a one-to-one relationship with the data field. Otherwise, unexpected behavior could occur.

As of v2019.1.1+, Sort and Group-By Values are not honored when the data field is being used within a formula sort. This change was made to prevent unexpected behavior from occurring in these instances.

Equivalent to the Sort and Group-By Value property when editing column metadata for Data Objects in the Admin Console.

 

See Also

Reference

EntityColumnMetadata Class
EntityColumnMetadata Members