Lists

Sort Data Model

6min
overview the sort data model action sorts a data model list based on multiple criteria 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 { "idfield" "id", "sort" \[ {"field" "path field1","ordertype" "asc"}, {"field" "path field2","ordertype" "desc"} ] } 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)