on 09-03-2008 10:40 AM
Hi guys,
I'm trying to satisfy following mapping condition but I can't achieve it:
if NodaA(1..1) exists, repeat per each NodeX, else repeat it per each NodeY.
The problem is EXISTS function returns only one item in the queue and NodeX and NodeY have different number of occurence. If these would be the same I could use OneAsMany, byt if NodeX is there 5times and NodeY 7, I'm not able to do it.
Any ideas, how to acjieve this?
Thanks a lot,
Peter
Hi Peter,
You can do this using a ADVANCED UDF. Try this.
The UDF will have three inputs:
1. NodeX>Remove Context>
2. NodeY>Remove Context>UDF
3. NodeA> Exist>
The UDF Cache Value will be queue.
Public Sample(String[] NodeX,String[] NodeY,String[] NodeA Container.....) {
if(NodeA[0].equals("true"))
{
for (int i=0;i<NodeX.length;i++)
result.addValue(NodeX<i>);
}
else
{
for (int j=0;j<NodeX.length;j++)
result.addValue(NodeY[j]);
}
}// end of class
Thanks,
Bhargav
Note:Award Points if found useful
Edited by: Bhargav Srinadh Gundabolu on Sep 3, 2008 12:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
There is no need to check if NodaA exists because its occurence is already 1..1 (Mandatory). I hope this helps...
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Have you tried to change the context of NodaA?
Regards,
Radek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
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.