This function has multiple uses:
Retrieves the value of a particular metadata field from local, active, or environment data.
Retrieves the value of a particular column from a specific ResultSet.
Retrieves information about ResultSet rows.
Takes two parameters:
The first parameter is either the type of data or the name of a ResultSet.
The second parameter is the name of a metadata field, the column name, or a ResultSet row parameter.
You can also use a shorthand format that returns results identical to the getValue(arg1,arg2)
function. The format uses the form <$arg1.arg2$>
, where arg1 and arg2 are the literal string arguments "arg1" and "arg2" to the getValue function.
Note:
Data types (local, active, and env) and ResultSet parameters must start with the # symbol.The following parameter combinations can be used:
getValue and Shorthand Formats | Description |
---|---|
getValue("#local",fieldName)
<$#local.fieldName$> |
Retrieves the value of the specified metadata field from the local data. |
getValue("#active",fieldName)
<$#active.fieldName$> |
Attempts to retrieve the value of the specified metadata field from the data in the following order:
|
getValue("#env",fieldName)
<$#env.fieldName$> |
Retrieves the value of the specified metadata field from the environment settings. |
getValue(ResultSetName,fieldName)
<$ResultSetName.fieldName$> |
Retrieves the value of the specified metadata field from the current row of the specified ResultSet. |
getValue(ResultSetName,columnName)
<$ResultSetName.columnName$> |
Retrieves the value of the specified column from the current row of the specified ResultSet. |
getValue(columnName)
<$columnName$> |
Retrieves the value of the specified column from the current row of the current ResultSet. |
getValue(ResultSetName,"#row")
<$ResultSetName.#row$> |
Retrieves the number of the current row in the specified ResultSet.
The first row is 0. |
getValue(ResultSetName,"#numRows")
<$ResultSetName.#numRows$> |
Retrieves the total number of rows in the specified ResultSet. |
getValue(ResultSetName,"#isRowPresent")
<$ResultSetName.#isRowPresent$> |
Checks if at least one row is present in the specified ResultSet.
This is useful when looping manually with rsNext. |
getValue(ResultSetName,"#isEmpty")
<$ResultSetName.#isEmpty$> |
Checks if the specified ResultSet does not contain any rows. |
See Variations for output values.
Returns an empty string if a value is not found.
Gets the Content ID from the ResultSet named DOC_INFO:
<$name = getValue("DOC_INFO","dDocName")$>
or
<$name = <$DOC_INFO.dDocName$>
Checks to see if the passed parameter dDocType (which is in the local data) equals the value in the active ResultSet:
<$loop DocTypes$> <$if strEquals(#active.dDocType, getValue("#local","dDocType"))$> <!--do special HTML for selected document type--> <$endif$> <!-- additional statement--> <$endloop$>