ph_setdevicesort PowerHome formula function
Description
Sets the sort criteria for the Device Status Screen.
Syntax
ph_setdevicesort ( sort )
Argument Description
sort Sort expression to apply to the Device Status Screen
Return value
Integer. Returns 1 if the filter succeeds. - 1 is returned if the sort fails.
Usage
Use the ph_setdevicesort formula to programatically sort the rows displayed on the Device Status Screen.

The sort criteria for a column has one of the forms shown in the following table, depending on whether you specify the column by name or number. Order is a, asc, or ascending for ascending order or d, desc, or descending for descending order. Order is case insensitive. If you omit order or specify an unrecognised string, the sort is performed in ascending order.

You can specify secondary sorting by specifying criteria for additional columns in the format string. Separate each column specification with a comma.

Syntax for sort order Examples
columnname order "location a,key_desc a"
"type"
#columnnumber order "#6 D,#7 A"