Class: Reference
Description
This method adds a process scope value to an object. This method provides a mechanism to almost build a property into an object that does not exist within the database. The property will never be stored in the database, but it is stored within the object so that it can be passed to other labels/routines and referenced within that code. In essence, this reduces the global scope use of variables. The Reference.getStoredValue method retrieves that stored value from the object.
Syntax
do referenceObject.setStoredValue(String tag,String value)
Parameters
tag |
The name of the location within the object where a data value is stored. Any non-empty value can be used. |
value |
The data to store in the object so it can be passed to other routines as part of the object rather than as a separate variable. |
Returns
Void
When Became Available
Profile v7.0
Example
// Create a reference object with runtime properties only
type Reference REF = Class.new("Reference")
// Store a string at a well defined tag
do REF.setStoredValue("Store@","some value")
...
// retrieve the value
type String RETRIEVE = REF.getStoredValue("Store@")