ph_retrievevars PowerHome formula function
Description
Retrieves and/or deletes a copy of variables that were previously stored in the database using the ph_storevars function.
Syntax
ph_retrievevars ( id, type )
Argument Description
id Long. The ID number you originally used in the ph_storevars function to store a copy of the variables.
type Integer. The type of retrieval. Use 0 to retrieve the stored variables into the current variable set and delete the stored variables from the database. Use 1 to retrieve the stored variables into the current variable set but do not delete them from the database (they can be retrieved again). Use 2 to delete the stored variable set without copying to the current variable set.
Return value
Integer. The result of the retrieve variables operation. 0 is returned for success or a type value out of range. 1 is returned if there is an error retrieving the variables with the specified ID. 2 is returned if there is an error deleting the stored variables in the database.
Usage
Use this function combined with the ph_storevars function to store and later retrieve a snapshot of the current variable set.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_retrievevars(322,0)
The above example will retrieve a copy of variables previously stored under the ID 322 and overwrite the current variable set. It will then delete the stored variable set under ID 322.