Global variables and values should be used only when necessary. They are used for a variety of operations in the database.
Global variables can be set on log in. Any global
variable assigned to the User object in the Xephr
To view the global variables for a specific session, enter the following in the address bar in the browser: http://test1.ndsasp.com/xephr/globals.
When creating global variables, please make them entity or block specific, so that they will not overwrite or be overwritten by those on other entities or those set on log in.
Each global variable must be set individually.
The names of global variables cannot contain a period ( . ) as that is how BLOCK.FIELD references are defined.
See Also
Xephr URL Generation and Embedding Values in URLs
These global variables are set by the system and are read-only.
CURRENT_FORM: the current form on the entity
E_MAIL: Set from the user security record.
HOSTNAME: the hostname on which Xephr is running.
XEPHR_CURRENT_USER: the identifier for the current user.
XEPHR_CURRENT_USERNAME: the current user name from the user security record.
XEPHR_ENTITY_NAME: the current entity name.
When setting a global variable, the Hyperlink To field will contain the function call, and the Hyperlink Scripted pop-list needs to be set to true.
Enter the Xephr function call to set a global variable.
SetGlobalValue
Add an open parenthesis (
Enter the name of the variable that you are setting in quotes followed by a comma ‘GLOBAL’,
Enter the location of the value that will be set for this variable.
If the value is coming from a field on a block, enter the code to obtain the field value, NOT followed by a comma. $$BLOCK.FIELD$$ or $$BLOCK.FIELD.first$$
If the value is hard-coded, enter the hard coded value in quotes, NOT followed by a comma. ‘VALUE’
Add a close parenthesis )
Always close with a semi-colon ;
For example, to set the global variable OQEM_LINE_ITEM on the OQEM entity, take the following steps:
Enter the word SetGlobalValue
SetGlobalValue
Add the open parenthesis.
SetGlobalValue(
Enter the name of the global variable being set, in quotes followed by a comma. In this case, it is OQEM_LINE_ITEM.
SetGlobalValue(‘OQEM_LINE_ITEM’,
The value for the variable is in the oedetl block, in the item_no field. The code to obtain the value is entered next, NOT followed by a comma.
SetGlobalValue(‘OQEM_LINE_ITEM’, $$OEDETL.ITEM_NO$$
Add the close parenthesis.
SetGlobalValue(‘OQEM_LINE_ITEM’, $$OEDETL.ITEM_NO$$)
End with a semi-colon.
SetGlobalValue(‘OQEM_LINE_ITEM’, $$OEDETL.ITEM_NO$$);
Xephr is a registered trademark of NDS Systems, LC.
Copyright