Almost. I want to know how many users want the hardware/software rather than how many overall orders there are for them.
I have a list of hardware, software and users uniquely identified. The user then compiles orders where a piece of hardware may be chosen. I want the quantity for that piece of hardware to reflect a sum of the user count in each order where that hardware has been chosen.
I'm afraid I'm rather new to XPath and the original post represents the extent of my knowledge so far when it comes to filters. Although your method seems logical I don't know how to implement it. Would you have any suggestions? Ignoring software as it's the same in theory, here are the important fields:
myFields > Hardware (Repeating group)
myFields > Hardware > HID (Unique auto-generated number)
myFields > Hardware > HQuantity (where I have been putting my filtered count)
myFields > Order (Repeating group)
myFields > Order > HWID (Repeating - references HID through drop-down list)
myFields > Order > UID (Repeating - references unique myFields > Users > UNetID through drop-down list)
(When I say reference I mean the drop down is populated by the Hardware and Users repeating node data respectively rather than an element reference - I just couldn't think of another way to phrase it).
So in my best obfuscated English/Code attempt: for each HQuantity check each order to see if HID exists in HWID and if it does count the UID fields and add them to HQuaintity. I would be able to do it so easily in code! Can you see a viable way to do it through XPath?
Thanks so much for your help already.