System Variables

 

System variables 2

$ABORT_MESSAGE. 2

$ABORT_PAGE. 2

$BACK_BUTTON_FROM_FORM. 2

$BACK_BUTTON_FROM_PAGE. 2

$BACK_BUTTON_SUPPORTED. 3

$BACK_BUTTON_TO_PAGE. 3

$BACK_BUTTON_USED. 3

$BATCH_MODE. 3

$BROWSER_IP_ADDRESS. 3

$BROWSER_TYPE. 3

$BROWSER_SUPPORTS_COOKIES. 3

$BROWSER_SUPPORTS_JAVASCRIPT. 3

$BROWSER_SUPPORTS_STYLESHEETS. 3

$COMMAND_STATUS. 3

$COMPONENT_PREFIX. 4

$CURRENT_PAGE. 4

$DATABASE. 4

$ESESSION_ID. 4

$FETCH_COUNT. 4

$FILE_NAME. 4

$FILE_NAME_USER. 4

$FORMID. 4

$FOUND. 4

$GLOBAL_HTML_FORM. 4

$INTEGRATION_CALL_SOURCE. 5

$JMS_COLLABORATION_ID. 5

$JMS_MESSAGE_ID. 5

$JOB_ID. 5

$LANGUAGE. 5

$NEXT_PAGE. 5

$NEXT_SEQUENCE_ID. 5

$PRESENTATION_USE_JAVASCRIPT. 5

$PRESENTATION_USE_STYLESHEETS. 6

$PRESENTATION_USE_POPUPS. 6

$PRESENTATION_USE_COLOUR. 6

$PRESENTATION_ZOOM_AMOUNT. 6

$PREVIOUS_PAGE. 7

$PROJECT. 7

$ROW_DELETED. 7

$ROW_EMPTY. 7

$ROW_INSERTED. 7

$ROW_SELECTED. 7

$SAVED_WORK_EXISTS. 7

$SESSION_ID. 7

$SYSTEM_DATE. 7

$SYSTEM_DATETIME. 8

$SYSTEM_NAME. 8

$SYSTEM_PREFERENCES_USE_JAVASCRIPT. 8

$SYSTEM_PREFERENCES_USE_POPUPS. 8

$SYSTEM_PREFERENCES_OPTION_COLOUR_BUTTON. 8

$SYSTEM_PREFERENCES_OPTION_ZOOM_BUTTON. 8

$SYSTEM_TIME. 8

$SYSTEM_TIME_NOW.. 8

$USER. 9

$USERVAR1,2,3. 9

$UFS_REQUEST_URL 9

$UFS_RETURN_URL 9

$UFS_SERVER_NAME. 9

$UPDATE_COUNT. 9

$WEB_SERVICE_OPERATION. 9

$WF_JOB_ID. 9

$WF_TASK_ID. 10

 

 

See also: FPL Command Syntax, FPL functions syntax

 

 

 

System variables

A number of system variables are maintained automatically by the system. These are all read only except where indicated otherwise.

 

System variables are accessed in FPL in the same way as form fields e.g.

 

set DUEDATE = $SYSTEM_DATE + 30;

if [ $COMMAND_STATUS != 'OK' ] ......

 

System variables are accessed from an API based language via system.variables e.g.

 

var fileName = system.variables.$FILE_NAME.value;

 

$ABORT_MESSAGE

 Contains the details of any runtime failure. After an abort command, contains the abort reason.

 

$ABORT_PAGE

Contains the name of the page at the time of a runtime failure or abort command. Will contain null if no current page exists e.g. when running a before or after form event.

 

$BACK_BUTTON_FROM_FORM

When the browser back button has been clicked, contains the name of the current form prior to the user clicking the back button. Contains no value when the current page and the page returned to are within the same form. This variable is read only.

 

$BACK_BUTTON_FROM_PAGE

When the browser back button has been clicked, contains the name of the current page prior to the user clicking the back button. This variable is read only.

 

$BACK_BUTTON_SUPPORTED

Contains 'Y' or 'N' to indicate whether or not use of the browser back button is supported for the current form. This variable is read/write.

 

$BACK_BUTTON_TO_PAGE

When the browser back button has been clicked, contains the name of the back button target page. This variable is read only.

 

$BACK_BUTTON_USED

Contains 'Y' or 'N' to indicate whether or not the user has just clicked the browser back button. This variable is read only.

 

$BATCH_MODE

Contains value 'Y' if the form is processing in batch mode, or 'N' if the form is being processed online.

 

$BROWSER_IP_ADDRESS

Contains the IP address of the requestor.

 

$BROWSER_TYPE

Contains the user-agent string from the HTTP header.

 

$BROWSER_SUPPORTS_COOKIES

Returns either 'Y' or 'N' to indicate whether the client browser is capable of supporting cookies.

 

$BROWSER_SUPPORTS_JAVASCRIPT

Indicates whether the client browser is capable of supporting Javascript. Normally contains 'Y' or 'N'. Contains '?'' if there is no browser client e.g. executing in batch mode. See also variable $PRESENTATION_USE_JAVASCRIPT.

 

$BROWSER_SUPPORTS_STYLESHEETS

Indicates whether the client browser is capable of supporting stylesheets . Normally contains 'Y' or 'N'. Contains '?'' if there is no browser client e.g. executing in batch mode. Note that if the client browser does not support Javascript, this variable will be set to 'N' and stylesheets will not be used to render HTML output. See also variable $PRESENTATION_USE_STYLESHEETS.

 

$COMMAND_STATUS

Contains the status of the last FPL script command executed. Will contain 'OK' if the command executed successfully. See the individual commands for a list of the possible error statuses.

 

$COMPONENT_PREFIX

If the current event was triggered from a component and the currently executing script is a global script, this contains the component prefix. e.g. if component COMP1 is inserted into a form with prefix A_, the prefix will be A_COMP1__. Please note that $COMPONENT_PREFIX can only be used in a script. If it is referred to from other contexts e.g. as a substitutable variable in a text, a null value is returned.

 

$CURRENT_PAGE

The page name for the current page.

 

$DATABASE

The name of the Database Connection to be used when dynamic databases have been specified. See using dynamic databases for more information.

 

$ESESSION_ID

The Verj.io form session id that uniquely identifies this form context.  This is a numeric value that is unique within the http session context of the end user.

$FETCH_COUNT

After a fetch or fetchtable command, this variable contains the number of retrieved records.

 

$FILE_NAME

Contains the full path of a file created by the system e.g. when creating an XML file using write RESOURCE_NAME, when uploading files using the upload command, or generating PDF documents with the print or PDFPrint commands.

 

$FILE_NAME_USER

Contains the last portion of the name of an uploaded file. e.g. if a user has uploaded a file from C:\My Documents\my_cv.doc, this variable will contain my_cv.doc.

 

$FORMID

The name of the form.

 

$FOUND

After a fetch command or a dynamic list check, this variable contains Y or N to indicate whether a record was found.

 

$GLOBAL_HTML_FORM

Contains Y or N to indicate whether or not the HTML <form> tag is positioned to include all JSP and HTML panels. This is configured as a form property..

$INTEGRATION_CALL_SOURCE

Contains the calling source that invoked the integration service. This is set to one of four values depending on the method of entry to invoke the integration service:

 

         Web – Integration service was invoked by an incoming request from a web based client.

         Designer –Integration service was invoked from the studio

         Form – Integration service was invoked from another form e.g call form MY_INTEGRATION_FORM

         Schedule – Integration service was invoked from a scheduled task.

 

 

$JMS_COLLABORATION_ID

This value must be set within FPL when using the Send Receive JMS Adapter (See Send Receive JMS Adapter for more information). This value is validated with the JMS collaboration id returned from JMS.

 

$JMS_MESSAGE_ID

This value is set from the JMS Adapter (See JMS Adapter for more information). The value contains the unique JMS message id of a message sent, received or called synchronously.

 

$JOB_ID

Returns the unique workflow job id when referenced from a workflow system activity task or decision node. See also variable $WF_JOB_ID.

 

$LANGUAGE

The language code for the user's session. This variable can be updated to dynamically change the runtime language e.g.  See Internationalization.

 

set $LANGUAGE = 'NL';

 

$NEXT_PAGE

The page name for the next page.

 

$NEXT_SEQUENCE_ID

This is set by the sequence command and contains the next number from the specified sequence. See sequence command.

 

$PRESENTATION_USE_JAVASCRIPT

Indicates whether Javascript is being used to render HTML pages. Normally contains 'Y' or 'N'. Contains '?'' if there is no browser client e.g. executing in batch mode. This variable can be used to dynamically enable and disable the use of Javascript. e.g.

 

set $PRESENTATION_USE_JAVASCRIPT = 'N';

 

Javascript can only be dynamically enabled if the client browser provides support for Javascript, otherwise the command is ignored. See also variable $BROWSER_SUPPORTS_JAVASCRIPT.

 

$PRESENTATION_USE_STYLESHEETS

Use of this variable is deprecated starting from Version 4.0 and will always return a value of 'Y' 

Indicates whether style sheets are being used to render HTML pages. Normally contains 'Y' or 'N'. Contains '?'' if there is no browser client e.g. executing in batch mode. This variable can be used to dynamically enable and disable the use of style sheets. e.g.

 

set $PRESENTATION_USE_STYLESHEETS = 'Y';

 

Dynamically enabling style sheets will always result in the use of style sheets in generated HTML regardless of the setting of $BROWSER_SUPPORTS_STYLESHEETS. See also variable $BROWSER_SUPPORTS_STYLESHEETS.

 

$PRESENTATION_USE_POPUPS

Indicates whether the system will display 'popup' windows as new windows or in the original form window. Normally contains 'Y' or 'N'. Contains '?'' if there is no browser client e.g. executing in batch mode. This variable can be used to dynamically enable and disable the use of popup windows. e.g.

 

set $PRESENTATION_USE_POPUPS = 'N';

 

(See server property Do Not Popup New Windows for more information)

 

$PRESENTATION_USE_COLOUR

Use of this variable is deprecated starting from Version 4.0 and will always return a value of 'Y'

Indicates whether the colors specified in the presentation template are displayed. When set to 'N', pages are displayed in black and white. This variable normally contains 'Y' or 'N'. It can contain '?'' if there is no browser client e.g. executing in batch mode. This variable can be used to dynamically enable and disable the use of color. e.g.

 

set $PRESENTATION_USE_COLOUR = 'N';

 

$PRESENTATION_ZOOM_AMOUNT

Use of this variable is deprecated starting from Version 4.0 and will always return a value of 0.  

Contains an integer that specifies how many times the font sizes specified in the presentation template should be incremented. This provides the ability to dynamically increase and decrease the size of all displayed texts. Setting this value to 0 resets sizes to the presentation template values.

 

set $PRESENTATION_ZOOM_AMOUNT = 2;

 

$PREVIOUS_PAGE

The page name for the previous page.

 

$PROJECT

The name of the project containing the form.

 

$ROW_DELETED

Contains Y or N to indicate that the user has clicked the Delete checkbox for the current row of the table being processed.

 

$ROW_EMPTY

Contains Y or N to indicate that the current row of the table being processed is empty.

 

$ROW_INSERTED

Contains Y or N to indicate that the current row of the table being processed has been inserted by the user using the Add row button or using the FPL insertrow command. 

$ROW_SELECTED

Contains Y or N to indicate that the user has clicked the Select checkbox for the current row of the table being processed. 

 

$SAVED_WORK_EXISTS

This system variable contains Y or N to indicate whether the user has previously saved a form, and therefore a restore is possible. This can be used to change the system's default behaviour regarding the appearance of the Save and Restore buttons.

 

$SESSION_ID

The session id supplied by the application server for the current end-user session. This can contain a mixture of characters and numbers and will be a unique value within the current execution of the application server.

 

$SYSTEM_DATE

The current day's date. This should only be used in conjunction with Verj.io form fields of type DATE. If used with a character field, the julian date will be displayed. For example:

             set DATE_FIELD_1 = $SYSTEM_DATE;

 

$SYSTEM_DATETIME

The current day's date and time to second accuracy. This should only be used in conjunction with Verj.io form fields of type DATETIME. For example:

             set DATETIME_FIELD_1 = $SYSTEM_DATETIME;

 

$SYSTEM_NAME

Contains the system name as defined server property System Name. This variable is read only.

 

$SYSTEM_PREFERENCES_USE_JAVASCRIPT

Use of this variable is deprecated starting from Version 5.0 and will always return a value of 'Y'

Indicates the setting of the global Javascript flag, Contains 'Y' or 'N'.  

$SYSTEM_PREFERENCES_USE_POPUPS

Indicates the setting of the global window popup flag, Contains 'Y' or 'N'. (See server property Do Not Popup New Windows).

$SYSTEM_PREFERENCES_OPTION_COLOUR_BUTTON

Use of this variable is deprecated starting from Version 4.0 .

Indicates the setting of the global color button flag, Contains 'Y' or 'N'.  

$SYSTEM_PREFERENCES_OPTION_ZOOM_BUTTON

Use of this variable is deprecated starting from Version 4.0.

Indicates the setting of the global zoom button flag, Contains 'Y' or 'N'. 

 

$SYSTEM_TIME

The current time as a string value in the format hh:mm. This can be assigned to form fields of type TIME or CHAR. For example:

 

set TIME_FIELD_1 = $SYSTEM_TIME;

 

For computations involving time, use $SYSTEM_TIME_NOW. 

 

$SYSTEM_TIME_NOW

The current time as an integer value representing the number of seconds since midnight. If assigned to a character or integer field, the integer value will be displayed. This system variable is intended to be used for time calculations. For example:

 

             set TIME_FIELD_1 = $SYSTEM_TIME_NOW + (60 *60);                 // current time + 1 hour

 

where TIME_FIELD_1 is a field of type TIME.

 

$USER

Contains the end user’s userid. This field contains a value if user authentication is provided by either the application server or a Logon Service. (See Security for more information)

 

$USERVAR1,2,3

These three variables are written as hidden fields on all form pages. They provide an opportunity for user written Javascript to set field values and to receive and process these values in a FPL script. For example, an HTML or JSP panel might contain a button that sets $USERVAR1 using Javascript and then submits the Verj.io form. An event field could then be placed at the top of each page with a validation event script that checks for a value in $USERVAR1.

 

See Panel form interaction for more details on this technique and supported Javascript functions.

 

$UFS_REQUEST_URL

Contains a Version 4 format URL that can be used to invoke the form. This contains the entire URL up to and including ufsmain, but omitting any passed parameters. e.g. http://localhost:8080/ufs/ufsmain 

 

$UFS_RETURN_URL

Contains the URL used to return to the Verj.io Server after a CALL URL command. This is the full URL of the ufsreturn servlet. e.g.

 

call URL 'http://www.my.app.com/myProg?return=' + $UFS_RETURN_URL;

 

$UFS_SERVER_NAME

Contains the hostname of the Verj.io Server.

 

$UPDATE_COUNT

After a delete, insert, update or updatetable command, this variable contains the number of updated records.

 

$WEB_SERVICE_OPERATION

This value is from an incoming integration request. It contains the name of the operation invoked from integration web service call. The operation name is bound to an Integration Adapter within an Integration Resource (See Integration Server for more information).

 

$WF_JOB_ID

Contains the unique workflow job id when a new workflow job is opened with the workflow open job or workflow start job commands. Use variable $JOB_ID to obtain a job id from a node within an executing job.

See form workflow facilities for more information.

 

$WF_TASK_ID

Contains the unique workflow task id when the form is workflow’ed. (See form workflow facilities for more information).