The documentation even states that when sorting by...
# suiteanalytics
g
The documentation even states that when sorting by a formula, the first formula of that type is used. I believe this is also true in SuiteScript.