on 11-13-2007 2:21 AM
Hi,
I have a sinario where i need to create the Target Node when the Source Node is equel to some constant
Eg:
Source
<Node1> it is 0 to unbounded
<Number>
<Code>
</Node1>
If Number = x and Code = y then target node is to be created other wise no.
I have used it with node function "creatif" but when we use with creatif it is testing only once but node1 will be populated unbounded.
Is that we need to write any UDF...if so can you provide the code...
Thanks
Amaresh
Hi Amresh,
Just cross check your mapping..
Check this blog.
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write an UDF.
Input: a=Node1
b= Number
c= code
for(i=0;1<a.length;i++)
{
if(b[0].equals("X") and c[0].equals("Y"))
{
result.addValue("true");
}
else
{
result.addValue("false");
}
}
now pass this output to if condition so if the condition is true it will generate a node otherwise it will suppress the node.
Thanks and Regards,
Chirag Gohil
hi amaresh,
set context of number and code to the parent node of Node1 (currently the context of number and code mst be node1)
then use equalsS for both to check if they have 'x' and 'y' values and then use ifWithoutElse followed by splitbyvalue (if required i.e. if u need these values in a target structure in separate contexts) and map to target node.
this shud solve ur problem.
[reward if helpful]
regards,
latika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amaresh,
Can u give us the target structure?
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is because of the context you set your source node at.
Try setting the context at higher higherarchy.
I do not think you need to use creatif either.
Just check for the source node value and using the ifwithout else function populate a blank constant to the target node.
Thanks,
Himadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amaresh,
Could you please tell me how you did this mapping? because it should work for multiple occurrences of source node.
i look forward to hearing from you.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.