Sorting Order of List
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Sorting Order of List

Overview

You can sort the list view based on the field defined in the ‘orderBy' section. The 'direction’ will let you decide whether you want to sort it in ascending or descending order.

Default Configuration

The default order is as below

  1. Participant list page - Descending order based on registration date and participant ID

    "orderBy": [ { "expr": "Participant.regDate", "direction": "desc" }, { "expr": "Participant.id", "direction": "desc" } ]
  2. Specimen list view - Descending order based on the creation date

    "orderBy": [ { "expr": "Specimen.createdOn", "direction": "desc" } ]
Screenshot 2025-05-09 at 5.34.58 PM.png

Custom Configuration

Provided below is an example JSON code for sorting the list based on the specimen location.

{ "name": "specimen-list-view", "data": { "columns": [ { "expr": "Specimen.label", "caption": "Label", "metainfo": { "showLink": "true" } }, { "expr": "Specimen.createdOn", "caption": "Created On" }, { "expr": "Specimen.type", "caption": "Type" }, { "expr": "Specimen.tissueSite", "caption": "Anatomic Site" }, { "expr": "Specimen.pathologicalStatus", "caption": "Pathology Status" }, { "expr": "Specimen.availableQty", "caption": "Quantity", "metainfo": { "showUnit": "true", "measure": "quantity" } }, { "expr": "concat(Specimen.specimenPosition.containerName, concat_ws(\"\", concat(\" (\", Specimen.specimenPosition.formattedPos, \")\")))", "caption": "Location" } ], "criteria": "Specimen.collectionStatus = \"Collected\" and Specimen.activityStatus = \"Active\"", "orderBy": [ { "expr": "concat(Specimen.specimenPosition.containerName, concat_ws(\"\", concat(\" (\", Specimen.specimenPosition.formattedPos, \")\")))", "direction": "asce" } ], "filters": [ { "expr": "Specimen.label", "caption": "Label", "searchType": "contains" }, { "expr": "Specimen.lineage", "caption": "Lineage" }, { "expr": "Specimen.createdOn", "caption": "Created On" }, { "expr": "Specimen.type", "caption": "Type" }, { "expr": "Specimen.tissueSite", "caption": "Anatomic Site" }, { "expr": "Specimen.pathologicalStatus", "caption": "Pathology Status" }, { "expr": "Specimen.availableQty", "caption": "Quantity" } ] } },

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com