Skip to main content
Skip table of contents

setProperty

Allows a new value to be set for a property of an existing variable. Generally entries of Maps and Map-like variables, such as Data Items, are considered properties, whose values this command can change.

Attributes

target

Required

Value type

EL-evaluated

Yes

String

No

The resolved String should be an EL-expression specifying the property whose value is to be changed.

value

Required

Value type

EL-evaluated

No

Any

Yes

Defines the new value for the property specified withtarget.

required

Required

Value type

EL-evaluated

No

Boolean

No

If this attribute resolvesinto true, the value attribute resolving into null produces an error.

If not defined, value of false is used.

Examples

The setProperty command can generally be used as an alternative to addMapEntry if the goal is to give new values to existing keys in a Map. Have the target attribute specify a key of the Map to set that entry's value.

CODE
<setProperty target="${contactMap.address}" value="${newAddress}"/>

In addition to Maps and their kin, some other value types also have "properties" - such as Files. One could use setProperty to change the title of a File value:

CODE
<setProperty target="${composedDoc.title}" value="The Composed Document"/>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.