Reputation: 2578
Given I have an Orbeon Form with a repeating grid/element named promo-slots with single control slot, is there a way to add a constraint so that each slot has a unique value?
I have tried following constraint, but it is not valid.
count(/form/promo-slots/slot[text() = .]) = 1
Here is the XForm instance definition
<xf:instance id="fr-form-instance">
<form>
<id/>
<title/>
<promo-slots>
<slot/>
<slot/>
<slot/>
<slot/>
</promo-slots>
</form>
</xf:instance>
Upvotes: 1
Views: 343
Reputation: 274
Compare the value against "slot" values, but except the current control:
not (. = (../../promo-slots/slot except .))
Regards
Jez
Upvotes: 2