on 06-24-2013 9:22 AM
Hello,
For one mapping, I have to know the number of context with value in a sub context.
Have a look on my example.
<Context_1>
<VALUE_CONTEXT_1>"1"</VALUE_CONTEXT_1>
<Context_2>
<vALUE_Context_2>"1"</vALUE_Context_2>
</Context_2>
<Context_2>
<vALUE_Context_2>"2"</vALUE_Context_2>
</Context_2>
<Context_2>
<vALUE_Context_2>"3"</vALUE_Context_2>
</Context_2>
</Context_1>
<Context_1>
<VALUE_CONTEXT_1>"2"</VALUE_CONTEXT_1>
</Context_1>
<Context_1>
<VALUE_CONTEXT_1>"3"</VALUE_CONTEXT_1>
<Context_2>
<vALUE_Context_2>"4"</vALUE_Context_2>
</Context_2>
<Context_2>
<vALUE_Context_2>"5"</vALUE_Context_2>
</Context_2>
<Context_2>
<vALUE_Context_2>"6"</vALUE_Context_2>
</Context_2>
<Context_2>
<vALUE_Context_2>"7"</vALUE_Context_2>
</Context_2>
</Context_1>
My problem, is that I want to know the number of Context_1 with Context_2
In my example, the result would be 2
Thanks a lot for you help.
JC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JC,
Couldn't reassemble Ambrish's solution, but it should be close. I'm on PI 7.0 so I'm not sure if it a limitation of that version that I'm not able to pull two arrows from one source.
Anyways: I did this which resulted in output "2". Maybe this image explains better. Please try.
Cheers
Message was edited by: Jens Schwendemann (could not rebuild Ambrish's solution, but should be close)
Hi,
Did you tried using the counter functionality ?
check that out...that will suffice for your requirement...
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.