Skip to main content

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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to identify parameters for HTML Property rules

Updated on September 25, 2019


Version 4.2SP6 makes it easier to use parameters with HTML Property rules (Rule-HTML-Property rule type). 

A Parameters tab on the rule form identifies any parameter values referenced in the HTML code on the HTML tab.

Using parameter-based HTML Property rules improves flexibility and reduces the number of distinct HTML Property rules you need to build and maintain in your application.


Suggested Approach

A new tab on the HTML Property rule form labeled Parameters identifies the parameters used in the HTML code, and the JavaScript data type of each.

As you create an HTML Property rule, for each parameter you reference in the HTML code, identify that parameter on the Parameters tab.

V4.2SP6 does not validate the Parameters tab against the HTML code. It is your responsibility to ensure that every parameter referenced in the code is also listed on the Parameters tab.

Setting Parameter Values

Once defined, you can call an HTML Property rule by using the reference JSP tag in any HTML rule, as the value of the format attribute.


<pega:reference name=".Currency" mode="display" format="Currency2"/>

In this example, the HTML property rule Currency2 is used to format the value of the .Currency property.

You can set values for the HTML Property rule parameters within the reference JSP tag by using the pega:param tag. For example:

<pega:reference name=".Currency" mode="display" format="Decimal">
    <pega:param name="ThousandsSeparator" value="-1"/>
    <pega:param name="Precision" value="3"/>
  <pega:param name="Locale" value="en-us"/>

Some parameters are optional; others may be required to have a non-blank value.

At design time, when you save the HTML rule containing this tag, the system validates the parameters listed in the pega:param JSP tag against those listed on the Parameters tab of the HTML Property rule.

At runtime during execution of stream processing, when the system encounters this pega:reference tag in the HTML code, it:

  1. Creates a new parameter page
  2. Adds the parameter name-value pairs to the new parameter page
  3. Uses these values in interpreting the HTML and JavaScript code in the HTML Property rule execution.

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. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us