ph_storevars PowerHome formula function
Description
Store a copy of the current variable set in
the PowerHome
database.
Syntax
ph_storevars ( id
)
Argument |
Description |
id
|
Long. A number representing the stored
variable set that will be later retrieved with ph_retrievevars.
|
Return value
Long. Returns the ID that the variable set
was stored under. Returns - 1 if the first step of the store operation fails.
Returns - 2 if the second step of the store
operation fails.
Usage
Use this function to take a snapshot of the
current variable set and save them in the PowerHome database. Use the
ph_retrievevars function to retrieve and/or delete a stored variable set. Care
should be taken to not store too many copies or copies that contain large
amounts of data as this can make your database grow to unwieldly
proportions.
Use 0 for the id parameter to have the function
automatically assign the ID for the stored variable set. The dynamically
assigned ID will be returned from the function and should be stored for
later retrieval.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_storevars(322)
The above example
takes a snapshot of the current variable set and stores it as ID 322. Use
ph_retrievevars(322, 0) to retrieve the stored variables into the current
variable set and delete the stored copy from the
database.