oracle-apex

How use Javascript to get Interactive Report Sort Order in Oracle Apex


Does anyone know if there is a way in Oracle Apex 22.1 to get an Interactive Report's sort order using javascript?

Instead of the native download action, We are using BI Publisher to download our reports. I need to know how the user have sorted the report on the screen so I can apply the same sort in Excel.

I have not found anything in the APEX javascript APIs that does this.


Solution

  • Look for the "aria-sort" attribute in the column header. Note that you have the give each column a static id in the interactive report definition > column > Advanced setting. In the screenshot below I only gave the "JOB" column a static id - the other columns have generated ids that are not usable for your case.

    inspect IR headers