cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping error

vijender_p
Active Participant
0 Kudos

Hi All ,

Am Facing an issue in pulling the data as per the below logic :
Requirement :

"If both values ('UBS Participant local ID & 'UBS (EVO ID)') are not equal to null then pass value 9017 and 9007

If 'UBS Participant local ID is not equal to null then pass value as 9017

If' UBS (EVO ID)' is not equal to null then pass value as 9007" E1P0105 USRTY


And it is not working , when

UBS Participant local ID filled if USRTY = 9017 E1P0105 USRID
UBS (EVOD) filled if USRTY = 9007 E1P0105 USRID_LONG


Regards,

Vijender

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member190293
Active Contributor
0 Kudos

Hi Vijender!

As I could see from your code, your iteration is always performed only once. What's the mean of it?

If you want to iterate through all of your elements, you should change contexts of your source fields up to one level or use RemoveContexts standard function after MapWithDefault. And it's also worth noting that Counter function returns one value per context so its length in your case is the constant - 1.

Regards, Evgeniy.

Andrzej_Filusz
Contributor
0 Kudos

Hi Vijender,

I'm not sure if I understand your requirements, but try to remove 'break' command from your 'for' loop in UDF.

Best regards,

Andrzej

vijender_p
Active Participant
0 Kudos

Hi Evgeniy ,

I have used it but also am facing issue , can you share your test results .

Regards,

Vijender

former_member190293
Active Contributor
0 Kudos

Hi Vijender!

Try to use IfWithoutElse and IfThenElse finctions in your mapping instead of using IfSWithoutElse and IfSThenElse.

Regards, Evgeniy.