cancel
Showing results for 
Search instead for 
Did you mean: 

mapping issue

Former Member
0 Kudos

Hi

Iam facing an issue when input has null in between for e.g. input queue has true,null,true. When this happens target structure is created only once, but it needs to create twice

source(0..n)

personname (0..1)

Organization (0..n)

Org.name

Org.address

Target

Infomration

Producerinfo (0..n)

personame(0.1)

contactinfo(0..n)

Org.address(0..1)

Producerinfo needs to be crated when ever personname and org.address are present in source. When my source structure has these elements not consecutively..like source has these elements in first instance and third instance my target structure producerinfo is not getting created twice. It is getting created only for first time.

I have used createif node function.. createif personame and org.address exists mapped to producer info.

When I see the display queue for createif -> it shows that it has null in between.

Please share your thoughts

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use this UDF which basically looks for 'null'' and ignores it

String ret="";

for(int i=0;i<a.length;i++){

if(a<i>.length()!=0)

ret=a<i>;

}

result.addValue(ret);

SOurceValue->removeContext> UDF-->> targetValue

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Vamsi,

Try to use, node function "removeContext" to map "Producerinfo" node

-Rohit

Former Member
0 Kudos

Provide example with source and target values and expected results.

Former Member
0 Kudos

Hi vamsi,

Try to map createif>oneasmany>target

Check it once.

Reg,

Sushama

Former Member
0 Kudos

I think you might have to use. graphical mapping UseOneAsMany.. I would look into that.

I can't find the tutorial. But Riyaz.net has it.