Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Apply-DataTransform method

Updated on August 16, 2022

Use the Apply-DataTransform method to invoke a data transform for updating an existing clipboard page or pages. (In contrast, use the Page-New method to create a new page and invoke a data transform in a single step.)

The calling activity can share its parameter page with the data transform (by selecting the Pass the current parameter page check box).

Parameters

This method accepts two parameters:

ParameterDescription
DataTransform Specify the data transform to be applied.

To locate the data transform with rule resolution at runtime, the system uses the class of the activity's step page (specified in the row on the Activity rule form with the Apply-DataTransform method) as the initial Applies To key part, and searches the class hierarchy for a data transform with the name as specified in this DataTransform field. If the Step Page field is blank for this line on the Activity rule form, the system uses the Applies To key part of the activity as the initial Applies To key part to locate the data transform.

Optionally, you can identify the Applies To key part of the data transform explicitly, using the format class.data_transform_rule; for example:

Apply-DataTransform Data-Admin-Operator-ID.pyDefault

The explicit class format causes rule resolution to bypass all class hierarchy searches — the data transform must be present in the specific class identified before the dot. (Other aspects of rule resolution operate normally.) Because use of explicit class names can introduce inflexibility, complicate debugging, and reduce opportunities for rule reuse, avoid this format whenever possible.

Pass the current parameter pageSelect to have the values from the activity's parameter page be available to (shared with) the data transform, and vice versa.

Results

The system finds the data transform rule to invoke using the Applies To class of the step page (or the Applies To class of the activity, if a step page is not specified on the line for the Apply-DataTransform method in the activity) and the value in the DataTransform field.

The system invokes the actions in the data transform, evaluating rows of the rule in sequence. If the Pass the current parameter page is checked, values in that page can be altered by the data transform. If the data transform has the Call superclass data transform check box selected, data transforms from higher classes are applied first.

Checking the method status

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

  • Previous topic Setting the status of an activity using the Activity-Set-Status method
  • Next topic Apply-Parse-Delimited method

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us