Tuesday 10 August 2010

Accessing rows in repeating groups in Browser Enabled Forms

There are not so many differences in versions of XPath between regular forms and web enabled ones. But inability to reference rows in web enabled forms by the index is one of the most annoying.

  1. The current row index expression:
    count(preceding-sibling::*[local-name() = "MyRepeatingGroup"])
    As you can see that formula successfully substitutes the position() function not available in web forms.
  2. Accessing value of the previous row:
    preceding-sibling::my:MyRepeatingGroup[count(preceding-sibling::my:MyRepeatingGroup) = count(current()/preceding-sibling::my:MyRepeatingGroup) - 1]/my:FieldToAccess

No comments:

Post a Comment