Once you have created a number of circumstanced rules, you may want to report these rules by their circumstanced values. For example, if one of the circumstance properties were “State,” you might want to see “all rules where ‘State’ equals ‘Massachusetts’”.
The Find Rules by Circumstance Definitions report allows you to create these reports. From the View menu, se;ect Rules > Find by Circumstance to display this report.
There are a number of circumstance properties which are included in this report as a default:
Choose a value from one or more of the columns and click Search to display all rules for the chosen property values.
Modifying the Report
If you have other circumstance properties you would like to report on, change the display with the following procedure:
1. Determine the property you wish to add or replace on this report. Example: “pyCountryCode”
NOTE: This property must have a Property Mode of
2. Save this property into the PegaAccel-Task-CircumstanceSearch class in your application RuleSet.
3. Create a Field Value rule for each of the values which will display in the report dropdown.
a. For the Applies To class, use the class of the original property.
b. For the Field Name, use the name of this property.
4. On the Table Edit tab of this property, set the Type of Table to Field Value.
In the Field Value Description section, set the class and Field Name to the values from the Field Value rules.
5. Create a
Value List property called CountryCodeList in the PegaAccel-Task-CircumstanceSearch class in your application RuleSet. This Value List property will hold all the values for the dropdown on the report.
6. In the class Data-Rule-Summary, open the standard list view called RulesByCircumstance. Copy this rule to your application RuleSet.
7. On the Content tab, in the Criteria section, add the information for your new property.
a. In the Label field, add a label that has not been used in this report. (In the example, the next letter was “D”.)
b. In the Field box, enter the word “Circumstance.” and your property. (Example: “Circumstance.pyCountryCode”)
c. In the Caption field, enter the label which you would like this property to have as a dropdown box header in the report. (Example: “Country Code”)
d. In the Condition dropdown, choose Is Equal.
e. In the Value field, enter the word “pySearchParameters.” and the Value List you created. (Example: “pySearchParameters.CountryCodeList”)
f. The Logic field at the bottom of this section should contain some logic (for example, “A and B not C”). Add your label into this logic using the AND keyword. (Example: “A and B and C” becomes “A and B and C and D”)
Save these changes to the list view.
8. In the class PegaAccel-Task-CircumstanceSearch, open the standard section rule called FindByCircumstance_Circumstances. Copy this section to your application RuleSet, and open that rule.
9. Click on the label for the last column; then click the Add column to the right icon (at the top of the form).
10. Highlight the box at the top of the column, and then click on the magnifying glass icon to display the Cell properties. Enter the value of this column (“Country Code”) and the property name.
11. Copy one of the existing dropdown boxes into the new column. Click on the magnifying glass to open the Cell Properties.
12. On the Field tab, enter the name of the property list (“.CountryCode(1)” )
13. On the Presentation tab, in the Format field, enter MultiSelectList. Click on the magnifying glass next to this Format to display the Format Parameter window.
14. Enter the appropriate parameters:
a. For propertyName, enter the name of the single value property (“.pyCountryCode”)
b. For className, enter PegaAccel-Task-CircumstanceSearch
c. For size, enter 6.
Save these changes.
15. Save the section rule, and then run the report again. You should see the additional column, and be able to choose values.