Lists

Sort Data Model

6min

Overview

The Sort Data Model action sorts a data model list based on multiple criteria.

Document image


Parameters

Inputs

  • list to be sorted (list<object>): This is both input and output. It will return the updated list in the same variable.
  • Sort JSON Configuration: This should be a "Monaco editor", allowing JSON.

Outputs

  • list to be sorted (list<object>): This is both input and output. It will return the updated list in the same variable.

Configuration Details

The Sort JSON Configuration should have the following structure:

JSON


The list will be sorted based on the cumulative rules described above.

IdField

  • This represents a field within the data structure that represents a unique value throughout the entire data set (e.g. the row identifier)

Sort

  • The Sort defines the sorting criteria list where you can sort by multiple fields.
  • Field: This specifies the field in the data model to sort by. For example, "path.Field1" refers to a field named "Field1" within an object located at the "path" in the data model.
  • OrderType: This determines the sorting order for the specified field. It can have two values:
    • Asc: Sorts the field in ascending order (from lowest to highest).
    • Desc: Sorts the field in descending order (from highest to lowest).



Updated 14 Apr 2024
Doc contributor
Doc contributor
Did this page help you?