When using a script written through an expression transform to generate data and bound to the “data” node on a Perspective Table, the “columns.0.sort” property is ignored when viewing the deployed view; when previewing the view in the Designer, the sort is applied correctly.
Moving the script to an expression transform, which is bound to a custom value in the root coordinate container, and binding the “data” node of the table to this custom coordinate container property, the sort is correctly displayed.
Moving the script to an expression transform, which is bound to a custom value in the view, and binding the “data” node to this property breaks it again.
Based on the above data, I suspect there is an order of operations issues here, where the sort Order function is not happening after the data is generated by the script.
The script may take up to 5 seconds to execute, if timing is a cause. As noted above, having the script run at the container level seems to block the table from loading until the script completes and thus the sortOrder of the data is shown properly?