Back Forward Page-Set-Messages method

Methods and instructions by function

Use the Page-Set-Messages method to add a message to a clipboard page. Like a message associated with a property, a message associated with a page normally prevents the page from being saved into the database.

NoteA later Page-Clear-Messages method applied to the same page removes the messages set by this method. In addition, page messages are cleared when a workstation user submits an HTML form to the PRPC server that includes values for properties on that page.

Parameters

This method has three parameters:

Parameter

Description

Page

Optional. Identify a page to contain the message. Use the keywords Primary for the primary page or Param for the parameter page. If you leave this blank, the system uses the step page, or the primary page if the Step Page column is blank.

Category

Optional. Leave blank unless when the message text is displayed the output is intended to be localized based on field value rules in a language-specific RuleSet.

Identify a localization category. The default is pyMessageLabel. See About the Localization wizard.

Message

Enter one of the following:

  • A Message rule key, with no quotes. Click the pencil button (pencil) to open or create the message rule.
  • A literal text string within double quotes.
  • The third key part of a field value rule where @baseclass is the first key part and the Category value is the second key part, to support localization. Use this only when the Category field is not blank.

Optionally, if the Rule-Message identified uses one or more parameters, follow the name by a backslash character, the letter t, and a text value for each value.

For example, the standard Message rule named ActivityNotDefined references one parameter in its text definition:

The activity {1} is not defined.

To provide a value BouncedCheck for this parameter, enter the following as the value of the Message parameter

ActivityNotDefined\tBouncedCheck

TipIf this activity is part of an application that will be localized to support multiple locales, always reference a message rule here. Do not enter literal text.

CautionAvoid using a field value whose localized value contains property references. PRPC evaluates the field value is each time the page is read, not only when the message is first added to the page. Because the properties may have new values (or be removed) when the field value is re-evaluated, this can be a source of confusion or error, for example when debugging with the Clipboard tool or the Tracer.

Results

The message becomes associated with the page as a page message.

Checking the method status

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

Definitions page message
Related topics About Message rules
Page-Clear-Messages method
Property-Set-Messages method

UpMethods and instructions by function