Hi,
Yes, this is possible in Helical Insight 5.2.3 by using the Custom Operations feature. Specifically, you can inject custom JavaScript code in the “Pre Execution” section of the report to achieve runtime sorting behavior.
Here’s how to implement it:
Step-by-Step Solution
-
Open the report in report edit mode.
-
Go to the Customize > Operations section.
-
Select “Pre Execution” tab.
-
Paste the following custom JS code:

var tempBaseUrl = new URLSearchParams(window.location.href.split('?')[1]);
var sortColumn = tempBaseUrl.get('sort_column');
var sortCond = tempBaseUrl.get('sort_condition');
if (sortCond) {
sortCond = sortCond.replace(/['"]/g, '').toLowerCase();
}
if (!['asc', 'desc'].includes(sortCond)) {
sortCond = 'asc';
}
if (sortColumn != null && sortColumn.trim() !== '') {
if (properties.table.hasOwnProperty(sortColumn)) {
if (!properties.table[sortColumn].includes('sort')) {
properties.table[sortColumn].push('sort');
}
}
fields.map(item => {
if (item.hasOwnProperty('alias')) {
if (item.alias == sortColumn) {
item.orderBy = [sortCond];
} else if (item.autogen_alias == sortColumn) {
item.orderBy = [sortCond];
}
} else {
if (item.autogen_alias == sortColumn) {
item.orderBy = [sortCond];
}
}
});
}
Usage Example
Your report URL should look like this:
https://<your-server-ip>:8443/hi-ee/#/report-viewer?dir=<directory>&file=<report-name>.hr&mode=open&sort_column=employee_name &**sort_condition=asc**
Replace:
sort_column with the alias or autogen_alias of your target column
sort_condition with either asc or desc
This will sort the specified column in the given order only at runtime, without applying any static sorting during report creation.
Let us know if you need help with identifying the correct column alias or implementing this in a different context!
Thank You,
Helical Insight.