cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

DSP boys, sorry, my mistake - the occurence is 0..1.

Bhargav, this is what I needed. I tried so hard to work with standard functions that I forgot this option

Thanks,

Peter

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Peter,

There is no need to check if NodaA exists because its occurence is already 1..1 (Mandatory). I hope this helps...

Regards

Former Member
0 Kudos

Hi!

Have you tried to change the context of NodaA?

Regards,

Radek