I want to thank you in advance.

I've been doing the search and found something close but did not work.

I have a 'multi selection list box' created in InfoPath with 8 items in it.

The box is called, "group1" and when applied a rule to show the count,

it only shows "1" even though I selected 5.

Some post had ' count(preceding-sibling::my:mlstSubCategory'

I don't see preceding-sibliing in my 'Insert Function' (is this built in command?)

So, that did not work...

1 Answer 1


You can use the count XPath expression on the values of the group1:


However it seems it always return +1 so you should change above expression to:

count(../my:group1/Value) - 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.