Insert Variable or Expression dialog

The Insert Variable or Expression dialog is used to insert a variable in a Text object or Button object so that its value can be displayed to the user on a page. The dialog is also available on some actions that require you to add a variable or constant expression – such as the Database Query action.

Note:
This dialog is often used to display the value of a variable to a user – see Displaying Variables on a Page for more information.

To edit the Insert Variable or Expression dialog settings:

  1. Use the Variable option if you want to insert the value of a System, Publication or Page variable. Click on the down arrow in the box under this option to list the current variables in your publication.

Note:
The variable list will show all System and Publication variables as well as Page variables for the current page. The Array variables are NOT in the list – see next point.

  1. Use the Constant Expression option if you want to insert the value of an Array or an OpusScript variable. Type an OpusScript expression in the box. – see Constant Expression examples.

Note:
The message box under the Constant Expression box will tell you if your expression is a valid expression or not (i.e. Expression OK or Expression contains errors). Just because the message says Expression OK it does not mean that anything will happen. For example, a valid expression is User_Name, however, if the variable User_Name does not exist, then nothing will happen.

  1. Click on the OK button to save your changes. The dialog will close and the variable or expression will be inserted at the appropriate point where you first opened this dialog.

Related Topics:

Overview of Variables in Opus