Apply Custom Multi-Field Sorting to a User Report

Script example for how to add multi-field sorting rows to a user report.

Use Case: To sort rows in a User Report by more than just one field.


The bottom half of this script is completely generic, and can be used on any User Report in Infoplus (everything from the // copy the rows comment to the bottom).  The compare function at the top of the script can be customized to look at whatever fields you want to sort by (adding more fields, or using whatever field names you need).  Be careful that you may need to deal with missing value (possibly represented as "--" in the report).