OrderBy function

Applies to JungleDocs for SharePoint 2010-2019.
For JungleDocs for Office 365 tutorials, click here.

This article describes the formula syntax and usage of the OrderBy function in JungleDocs.


Description

Orders items by field values in ascending or descending direction.

Syntax

OrderBy(recordSet; fieldName)

OrderBy(recordSet; fieldName; ascending)

OrderBy(recordSet; fieldName1; ascending1; fieldName2; ascending2)

OrderBy(recordSet; fieldName1; ascending1; fieldName2; ascending2; fieldname3; ascending3)

The OrderBy function syntax has the following arguments:

  • recordSet   Required. Any command that returns a list of items (e.g., GetView()).
  • fieldName   Required. The name of the field that you want to order recordSet by.
  • ascending   Optional. True and false values are supported.

Remarks

  • Supports up to 3 fields.
  • Orders in ascending direction if the ascending value is true or in descending direction if the ascending value is false.

Examples

OrderBy(ReportItems; "Modified"; false)

Orders report items by Modified date – newest on top.

OrderBy(GetView("Tasks"; "AllItems"); "Order")

Orders tasks by SharePoint system column Order.

OrderBy(GetView("Tasks"; "AllItems"); "Priority"; true; "Order")

Orders tasks by priority, then by SharePoint system column Order.

OrderBy(GroupBy(ReportItems; "Customer:Country"); "Sum(GroupItems; \"Total\")"; false)

Groups the selected items or current view by Country (Country of Customers) field and the sum of the Total field (Total amount of the billed invoices grouped by country). Then the record set is ordered in descending order by the OrderBy function. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us