Page 1 of 1

Transformer derivation syntax is need for my requirement

Posted: Tue Nov 02, 2010 10:31 am
by srinivas Guduru
In the Transformer I need to use below logic. For ADDRESS field derivation

When I am using below syntax it is througing error (RED colour) in the Transformer

Can any one Please correct the below syntax


if INPUT_Link.Field_NM_LNS =1 then INPUT_Link.LN_1_TX :' ': INPUT_Lin.LN_2_TX :' ': INPUT_Lin.LN_3_TX :' ': INPUT_Lin.LN_4_TX :' '
: INPUT_Lin.LN_5_TX :' ': INPUT_Lin.LN_6_TX
else ( if INPUT_Lin.Field_NM_LNS =2 then
INPUT_Link.LN_3_TX :' ': INPUT_Link.LN_4_TX :' ': INPUT_Link.LN_5_TX :' ': INPUT_Link.LN_6_TX
else(if INPUT_Link.Field_NM_LNS =3 then
INPUT_Link.LN_4_TX :' ': INPUT_Link.LN_5_TX :' ': INPUT_Link.LN_6_TX
else(if INPUT_Link.Field_NM_LNS =4 then
INPUT_Link.LN_5_TX :' ': INPUT_Link.LN_6_TX
else(if INPUT_Link.Field_NM_LNS =5 then INPUT_Link.LN_6_TX
)
)
)
)

INPUT_Link -- Input Link name
Field_NM_LNS Input field name
LN_1_TX Input field names

I am waiting for your solution

Thanks
srini

Posted: Tue Nov 02, 2010 10:47 am
by anbu
Where is the else part for your last if statement?

Code: Select all

if INPUT_Link.Field_NM_LNS =5 then INPUT_Link.LN_6_TX 

Thank yu very much Vivekananda

Posted: Tue Nov 02, 2010 11:20 am
by srinivas Guduru
Thanks Vivekananda, I got it and it is working fine

Regards

Srini

Posted: Tue Nov 02, 2010 2:40 pm
by ray.wurlod
What happens when you right-click on the expression and choose "Validate" from the menu?