Assuming this capability is not available yet,
will be of great value to have the capability
to sort a list of fields in a table on both the app script and the user interface by an attached index to field name.
For example, using some kind of mapping to attached a sort order number to each column (fields), then automatically sort the table on both the script and UI by the "Column Sort Index" above.
ColumnSort( myField1, 1)
ColumnSort( myField3, 2)
ColumnSort( myField2, 3)