The expense report template for Infopath that can be downloaded from Microsoft has a command button at the end of each line item. Upon clicking this button it displays an optional section for the line item based on the category chosen.
There is a rule on the button that i cant work out what it does
Action - Set a fields value
Field - itemPosition
Value: count(preceding-sibling::*)
The part that i haven't encountered before is the preceding and sibling functions mentioned in the value section.
What does this mean and how does it enable the optional section on the form when the button is clicked? There isn't any code anywhere that i can find