ph_setvar_a PowerHome formula function
Description
Sets the value of a LOCAL, TEMP, or GLOBAL system variable with any type of data.
Syntax
ph_setvar_a ( n, n, a )
Argument Description
n The type of system variable you would like to set. Valid values are 1 for LOCAL variables, 2 for TEMP variables, and 3 for GLOBAL variables.
n The number of the appropriate system variable. Valid values are 1 – 10 for LOCAL and TEMP variables and 1 – 20 for GLOBAL variables.
a Any type of data you would like to have stored.
Return value
Integer. Returns a 0 if successful and a 1 the system variable is undefined. You can pass any data type as the a argument. All LOCAL, TEMP, and GLOBAL variables are stored internally as strings and will be converted. Numeric values will be converted as is. Date values will have a mask of ‘yyyy-mm-dd’ applied. Datetime values will have a mask of ‘yyyy-mm-dd hh:mm:ss.fff’ applied. Strings go over without conversion. Any other data type will just be converted as is to a string and then stored.