Evaluates a variable definition as if it were Idoc Script. Can be used to recursively evaluate a literal string.

Type and Usage


The only parameter is a variable that defines a string to be evaluated as Idoc Script.


Returns the parameter string, with any Idoc Script in the variable definition resolved.


Variable one is assigned the string CompanyName, and variable two is assigned a string that includes variable one within Idoc Script delimiters. On a page, variable one presents the string CompanyName, variable two presents the string Welcome to <$one$> and eval(two) presents the string Welcome to CompanyName.

<$two="Welcome to <$one$>"$>

Say you wanted to exclude all metadata fields that have the prefix xPrefix in their names. You could use the eval function to dynamically write and evaluate Idoc Script for this purpose:

<$loop DocMetaDefinition$>
<$if strIndexOf("xPrefix", dName) >= 0$>
    <$myScript = "<$" & dName & ":isExcluded=1$>"$>

See Also