SetWebVariable |
Top Previous Next |
×V3.0Ø ((EMUE + Web)) Syntax - SetWebVariable <variable name> <variable value> Where: <variable name> is a literal string or a variable that contains a literal string. <variable value> is a literal string or a variable that contains a literal string.
Description: This command creates and assigns a value to a variable that will be used in a web macro. The variable created with the SetWebVariable command cannot be used in the rest of the EMUE script - it is only valid in the web macro. The variable name should be of the form -var_variableName where variableName is user-defined and -var_ is fixed (i.e. -var_myVar). When the variable is used in the web macro, only the user-defined portion is used and it is enclosed by curly braces (i.e. {{myVar}}.
Note: If the macro is being run line by line with RunWebMacroCode, the command could be concatenated with the variable value, which would eliminate the need to use SetWebVariable. The first option sets the variable ahead of time, whereas the second option concatenates the variable in the position where it should appear in the code.
Note: A web variable cannot be set unless the web browser has been opened with the OpenWebBrowser command.
Note: This command is a part of the Web Macro Commands, introduced in EMUE V3 and should not be mixed with Web Scripting Commands from EMUE V4.
Option 1: SetWebVariable "-var_name" name RunWebMacroCode "TAG POS=1 TYPE=INPUT:Text FORM=NAME:Form1 ATTR=ID:txtCompanyName CONTENT={{name}}" Option 2: RunWebMacroCode "TAG POS=1 TYPE=INPUT:Text FORM=NAME:Form1 ATTR=ID:txtCompanyName CONTENT=" name
Sample: SetWebVariable "-var_PatientID" PTID
|