Thanks. I agree having to write code was a pain. I am in a similiar situation, with another form, so let me try to be clearer.
I have a node (../../OptGroup_EQUIPMENT/EQUIPMENT) and under that is 2 child nodes (../../OptGroup_EQUIPMENT/EQUIPMENT/equipmenttype; ../../OptGroup_EQUIPMENT/EQUIPMENT/EquipInsp)
each of the child node have different list options, and I need to be able to count each equipment type, such as (Ladder), and of those Ladders I need to count (Fail). I have tried AND to link the 2 conditions but it is not working.
count (../../OptGroup_EQUIPMENT/EQUIPMENT/equipmenttype[. = "Ladder" and ../../OptGroup_EQUIPMENT/EQUIPMENT/EquipInsp = 'Fail'])
Any help would be appreciated.