cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA FUNCTION

Former Member
0 Kudos

Hi I would like to use a function where I can say "OR"

I have tried the boolean one but it doesn't work for Words.

SO I have QUALF----> Equals

I want qualf to be equal to WE or ZE or AG etc

How do I do this. Can someone tell me the Java Code to write such a function

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thanks for your input.

When ever I do something like this I get an error like this

Cannot cast ZU to boolean

I know this must be simple but all I want to do is say if QUALF IS EQUAL to ZU, AG, RE, RS, WE then return value TRUE.

I have it half done by using text function equals with QUALF going into one input.

What I need is a way of inputing several values in the opther input. So the result will return TRUE if QUALF is equal to any of the 4-5 input values I have.

I have tried to use the boolean OR function but it returns

Cannot cast ZU to boolean

Former Member
0 Kudos

Hi,

Use this fix value. As input your qualifier. Inside it your ZU, AG, RE, RS, WE with true and default put false.

It should be enough.

regards,

wojtek

Answers (5)

Answers (5)

Former Member
0 Kudos

Thank you people this seems to of done the trick. You guys are great I really appreciate your help

stefan_grube
Active Contributor
0 Kudos

You can use "fixValues"

WE, ZE, AG are mapped to true, default is false.

Boolean values are treated internally as Strings "true" and "false".

Regards

Stefan

Former Member
0 Kudos

Hi Guys,

Thank you for your input.

I was looking for the function code to put into the XI Mapping so I could create my own function code.

Basically I would like to have say 5 inputs and one output.

So the five inputs could be what ever constants i define. Basically the function is to say either one of the inputs are ok.

agasthuri_doss
Active Contributor
0 Kudos
HarshC
Active Participant
0 Kudos

Hi Alex,


if( (QUALF==WE) || (QUALF==ZE) || (QUALF==AG) )

is this what you had in mind? <b>|| </b>is the or operator in java

Regards,

Harsh