Thank you very much for this - I thought I understood it... didn't you just know there was going to be a but.
I have a repeating field /my:myFields/my:SKUIntroductionGroup/my:Region. This is a multi-select box on the form.
I want to ensure that the user selects at least one value. I cannot use "cannot be blank" property because there is always a blank one... unless I use code to delete it.
So I thought I would have a temporary variable that I could update with the count of non blank regions - and then base a validation on that count. Using the help above I have put a rule on my:Region to update a temporary variable with count(../my:Region[. != ""]).
This works when you are adding regions - but is not fired when you untick a box. If the last thing you do is untick - then the count is wrong.
What have I missed ? Is there a better way to validate that at least one Region is non blank
Catharine