cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with FixValues in MM

Former Member
0 Kudos

HI all,

I am using the FixValues conversion function in the MM. But i am getting some issue in using the mapped values in the UDF.

-


The mapping is as follows :

Input--> FixValues ---> MyUDF ---> output

-


The FixValues has following entries :

AND --> &

OR ---> ||

and default value is set as *

-


In UDF :

if ( input == "*" ) return ("END");

else return (input);

-


When I tested by providing

*input = "NOR" ; The fixValues took the value default value * (asterisk) . But when the UDF returned * (asterisk) which means that the IF conditional statement got failed.*

I dont really get this logic and return type from FixValues. I even tried with the numeric values, then also I am facing the same issue.

I appreciate your help and time.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try with the following code..


if ( input.trim().equals("*") ) return ("END");
else return (input);

You should do a String comparison using equals() method and not using == operator which is meant for comparing two objects..

Regards,

Ananth

Former Member
0 Kudos

Hi,

Why u r using fixed value.

Try using only one UDF.

a=input.

if((a[0].equals("AND")) !! (a[0].equals("OR")))

{

return(a[0])

} any of the condition matches then it will return the input

else

{

return("END");

} else return the END

Thnx

Chirag

Former Member
0 Kudos

I have given the example for 1 but there are many value pairs.

Former Member
0 Kudos

I believe we can use "==" to compare the string in JAva.

Thanks for your time.

justin_santhanam
Active Contributor
0 Kudos

Nope.

You shouldn't not. To compare string you must use only equals.

raj.

Answers (0)