cancel
Showing results for 
Search instead for 
Did you mean: 

exist function

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

> 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.

Former Member
0 Kudos

> 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

Former Member
0 Kudos

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

Former Member
0 Kudos

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