cancel
Showing results for 
Search instead for 
Did you mean: 

Want FFFF added to the first context value how to do it in graphical mapping

Former Member
0 Kudos

I want to add four letters FFFF to the first context value how to do it in graphical mapping

Accepted Solutions (1)

Accepted Solutions (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Anshu,

If your requirement is the target field should have the first value as FFFF and following by input values, then use the below udf

code snippet:

result.addValue("FFFF");

result.addContextChange();

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

    result.addValue(input[i]);

Former Member
0 Kudos

Hi Vishnu ,check the screen shot attached.My requirement is to add FFFF at the first context only i.e

if Input data is coming as

                         PO1iscreatedandspoolneedstobedone-context1

                         PO1iscreatedandspoolneedstobedone-context2

                         PO1iscreatedandspoolneedstobedone-context3

                         PO1iscreatedandspoolneedstobedone-context4

                         PO1iscreatedandspoolneedstobedone-context5

Output:-

                  FFFFPO1iscreatedandspoolneedstobedone-context1

                         PO1iscreatedandspoolneedstobedone-context2

                         PO1iscreatedandspoolneedstobedone-context3

                         PO1iscreatedandspoolneedstobedone-context4

                         PO1iscreatedandspoolneedstobedone-context5

So I need FFFF  only at the beginning of the first line i.e first context.

Regards

Anshu

former_member184720
Active Contributor
0 Kudos

If you really want a UDF then below should work. Set the execution type to " All values of Queue"

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

{

if(i==0)

{

result.addValue("FFFF"+var1[i]);

}

else{

result.addValue(var1[i]);

}

}

Former Member
0 Kudos

Worked with minor modification .Thanks

Answers (2)

Answers (2)

former_member184720
Active Contributor
0 Kudos

>>>how to do it in graphical mapping

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Anshu,

Could you be more specific about input values and requirement of the mapping logic.