cancel
Showing results for 
Search instead for 
Did you mean: 

Values generated in display queue but values not populating in file.

Former Member
0 Kudos

Hi All,

I am facing strange problem in which I can see that my UDF is giving right output, context is also generating in display queue, but values is not populating at runtime(for CostCenter target field)

In UDF I am checking if E1P0001-->PLANS = E1P1005-->OBJID.

I have notices that this situation is coming only when number of E1P0001 segments are less than number of E1P1005 segments, otherwise in vice versa case it works fine.

Please let me know why this happening.

Regards,

Sachi

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

Can you try adding mapWithDefault just after the UDF and then show us the display queue?

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

The result remains the same, Values in display queue of UDF, mapwithdefault,and target node, nut no values in output at runtime.

regards,

Sachi

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Dubey,

Thank you for that. Can you give us the code you used for getting the costcenter?

Regards,

Mark

Former Member
0 Kudos

String a = "";

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

if(var1[i].equals("true")){

for(int n=0;n<var4.length;n++)

{

a = var4[n];

for(int j=0;j<var2.length;j++){

for(int k=0;k<var3.length;k++){

if(var2[j]==var3[k])

{

result.addValue(a);

break;

}

}

}

}

break;

}

}

former_member184720
Active Contributor
0 Kudos

Do you have any condition for record node creation?

And if the input types are strings, can you change if(var2[j]==var3[k]) to if(var2[j].equals(var3[k]))

Former Member
0 Kudos

Hi Hareesh,

Yes I have a condition to generate record nodes which is as follows:

getRecords have following code:

String a = "";

String flag = "";

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

if(var1[i].equals("true")){

for(int j=0;j<var2.length;j++){

flag = "";

for(int k=0;k<var3.length;k++){

if(var2[j]==var3[k])

{

a = "true";

result.addValue(a);

flag = "X";

break;

}

}

if (flag == "")

{

a = "false";

result.addValue(a);

}

}

}

}

regards,

Sachi

former_member184720
Active Contributor
0 Kudos

Without XML, it's difficult to validate the UDF

However, you can just get the display queue on create-if function and see if the second value is false(suppress)?

Former Member
0 Kudos

display queue of createif is as follows:

former_member182412
Active Contributor
0 Kudos

Hi Dubey,

There is out of sequence for your record node and cost center field, the first value of record node is suppress that is why you are not getting in the output file. You need to create same number of entries for record node and cost center field. (Record node without context change and cost center field is with context change)

Regards,

Praveen.

former_member184720
Active Contributor
0 Kudos

Your costcenter(fields under records) should be inline to "records" creation.

Are you expecting 4 records on the target side? If so you should also get 4 values out for costcenter.

if the source values are missing in thee xml, you can always use mapwithdefault to send a blank value.

Former Member
0 Kudos

You are right Praveen. Thanks.

I eliminated else logic which was generating false and only used If(plans =objid) return true logic to generate records.

Regards,

Sachi

Answers (0)