Property-Set method

Use this method to set the value of one or more specified properties.

Parameters

The Property-Set method uses an array of parameters. Each row of the array contains a property name or reference (the destination), and a value (the source). Order is significant.

Parameter Description
PropertiesName Enter one or more target property references. If you precede the property with a period but no page name, the system expects this property to be on the step page. If the Step Page field for this step is blank, the system uses the primary page of the activity.
Note: Don't use this method to set the value of a property that is the target property of a Declare Expression rule. You can't save the Activity form if such a conflict is detected.

For example:

.myProperty
Primary.myProperty
MyPage.myProperty

For Value List, Value Group, Page List, and Page Group properties, enter a literal, property reference or symbolic index value (subscripts):

myList(15)
myChild(.Subscript)
myGroup("Massachusetts")
myGroup(<APPEND>)
.myGroup(<LAST>)
.myList(<INSERT>2)
.myList(<PREPEND>)
PropertiesValue Enter an expression to compute a value for each property. For example. you can enter:
  • A literal constant such as "Red"
  • A reference to the value of another property ( .pyLabel )
  • A reference to the value of a parameter variable defined on the current activity's parameter page ( Param.ParameterName )
  • An arithmetic operation (3.14159 * .Radius * .Radius)
  • A function call (@Year("20070430") that returns a non-void value. For more information on function syntax, see Methods for calling a function.
  • A reference to the value of a local variable defined on the parameter page ( Local.ParameterName )
  • A linked property reference (.linkedproperty.instanceproperty)

Results

If the step page does not exist, the system creates a new page of the class identified in the Pages & Classes tab.

The system evaluates each expression identified in the properties values column of the parameter array and assigns the result to the property or property part you identified in the corresponding PropertiesName column.

Any property messages previously associated with the property are cleared.

If the Type of the expression doesn't match the Type of the destination, the value is converted following the same scheme as within expressions. See Data type conversions (casting) in expressions and property assignments.

Each property value is validated against the property rule.

Rows are processed in sequence, so a property that is set in one row (as a destination) may be a source in a later row.

Note: The standard function PropertyExists() can check whether a property is already present on the clipboard.

Cautions

  • You cannot use this method for a property that is also the target property of a Declare Expression rule.
  • Do not attempt to set the value of a property that has a name starting with pz; changes to such properties are reserved.
  • Use the standard activity Work-.UpdateStatus — not this method — to change the value of a work item status ( pyStatusWork property).

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

Methods and instructions by function