Skip to main content
LinkedIn
Copied!

Table of Contents

Property-Set-Messages method

Use this method to associate a text message with a property. The system reads the appropriate property and adds the message to the property. If a property is on an embedded page, the message is added to all its parent pages.

You can provide the entire literal text of the message or reference a message rule key that in turn contains message text ( Rule-Message rule type).

Some message rules accept fill-in-the-blank parameters, identified in the message text by a number within parentheses. Do not confuse method parameters with message parameters, which appear within the Message parameter, and are numbered.

Parameters

This method has three parameters:

Parameter Description
Category Enter a localization category that is the second key part of a field value. The default is pyMessageLabel.

Otherwise, leave this field blank.

Message Identify the message to add to the property. You can enter values in this field in one of the following ways:
  • The third key part of a field value rule, where @baseclass is the first key part and the value specified in the Category field is the second key part.

    Use this approach when the Category field is not blank and the specified field value does not contain property references. Property references can lead to confusion because field values are evaluated each time the page is read, and property values can change over time.

  • The name of a Rule-Message instance without quotes.

    The list of available options in the SmartPrompt is limited to Error and blank category messages of the class of the specified Page.

    If the message supports parameters, append a tab-delimited string to the message name.

  • The literal text string within double quotes.

    If you using a field value (such as when a category is provided), you cannot specify a literal text string, since this results in a validation error when using a property reference or a parameter reference in the Message field .

    If your application supports localization, use one of the alternate options for this parameter.

Field Identify the property on which the message is set.

Results

The message is added to the property and its parent pages. This usually prevents the page containing the message from being saved. Associating a message with a property does not directly cause that message to be displayed to a user.

Checking the method status

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

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us