on 05-24-2010 10:11 AM
Hi
Say we have a field which under its parent node. When we use the exist function after this field, we get true or false depending on its existence. But we get certain cases where the parent node itself is missing. In this case the exist field will not give out "false" which i want. How can we ensure that?
> Say we have a field which under its parent node. When we use the exist function after this field, we get true or false depending on its existence. But we get certain cases where the parent node itself is missing. In this case the exist field will not give out "false" which i want. How can we ensure that?
Could you explain more detailled, when you want a "false" for a none-existing node?
When you have always
upper node
- parent node
- child node
upper node
...
then you can set context level to upper node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> we get certain cases where the parent node itself is missing. In this case the exist field will not give out "false" which i want. How can we ensure that?
First you have to generate the parent node and for that you have to use MapWithDefault function. Now when your parent node exists then the field under it should give the desired result.
Edited by: Sarvesh Singh on May 24, 2010 3:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check both the parent node and child field exists or not ? (some time parent exists and node doesn't exists)
if both parent and child exists then do the corresponding mapping by using the if then else statement.
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes u r correct.
But we get certain cases where the parent node itself is missing. In this case the exist field will not give out "false" which i want. How can we ensure that?
We know that if parent node is nt present then obviously the child node will not.
Now for ur requirement, check if the Parent node exists???
If yes then map accordingly.
If not then it means that the child also nt present and then u map accordingly...
Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.