Question

5
Replies
260
Views
HarshadaS3036 Member since 2019 1 post
Cox Communications
Posted: 1 year ago
Last activity: 2 months 1 week ago

Unable to access value list property from HTML rule

I have an HTML rule that runs on the pyReportContentPage. It as the following loop:

<pega:forEach name=".pxResults">
<tr>
<td><pega:reference name="$this.pyID"/></td>
<td><pega:reference name="$this.pyLabel"/></td>
<td><pega:reference name="$this.pyStatusWork"/></td>
<td><pega:reference name="$this.pyTextValue(1)"/></td>
</tr>
</pega:forEach>

The reference <pega:reference name="$this.pyTextValue(1)"/> is throwing the following error during run time.

The reference 1 is not valid.  Reason: invalid property name: '1' 

Obviously, the rule engine is assuming that the refernce to the value list is incorrect. If I change in a random way byadding a suffix <pega:reference name="$this.pyTextValue(1).pyValue"/>, then the exception disappears but the data turns out to be blank in the Excel attachment that is generated from the above HTML rule.

Should I refer to the value list differently?

Steps to Reproduce
  1. Navigate to a report definition.
  2. Filter out the results.
  3. Invoke the activity that calls the above HTML rule.
  4. Observe the tracer.
Error Message
The reference 1 is not valid.  Reason: invalid property name: '1' 
Attempted Solutions

Changed the reference to the following (notice the hard coding of the subscript in pxResults):

<td><pega:reference name="pyReportContentPage.pxResults(1).pyTextValue(1)"/></td>

It displayed the value in the first row in all rows. Obviously, we need a way to soft-code the subscript. Tried the following also:

<td><pega:reference name="pyReportContentPage.pxResults(<current>).pyTextValue(1)"/></td>

I got an error message while saving the HTML rule.

***Moderator Edit-Vidyaranjan: Updated SR details***

Pega Platform Reporting SR Exists
Share this page LinkedIn