Purpose
Sorting controls the order that data appears in Shuntware reports. It decides which records show first — for example, sorting trailers by age or by trailer number. You can choose ascending (ASC) or descending (DESC) order for each field.
Example Config
"sort": {
"scheduledReports/trailerSummary": [
["age_days", "ASC"],
["trailer_number", "ASC"]
]
}
How It Works
- "sort": Tells Shuntware how to order each report.
- "scheduledReports/trailerSummary": The report being sorted.
- Each line inside the list sets one rule:
- "age_days", "ASC" → Oldest trailers first
- "trailer_number", "ASC" → A–Z order for trailers with the same age
To Sort in Reverse
To flip the order, change "ASC" to "DESC":
"sort": {
"scheduledReports/trailerSummary": [
["age_days", "DESC"],
["trailer_number", "DESC"]
]
}
This shows the newest trailers first, and trailer numbers from Z–A.
Tips
- Put the most important field first.
- Keep the same order style across reports for consistency.
- Make sure the field names match exactly what’s used in the report.
Comments
0 comments
Please sign in to leave a comment.