cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an expression.

Former Member
0 Kudos

I need to create an expression for a text variable.

The expression shold be a simple if-then-else construct:

if the value of a numeric context variable is > 100, the expression returns the string "AAA", otherwise it returns the string "BBB".

I made several tries with the expression editor, but unsuccessfully. I also didn't find any document explaining how to do.

Please provide an example of such an expression.

Thanks in advance.

Livio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are you using 7.1 or 7.2 CE version?

There are a little bit more built-in functions in CE 7.2 and you are able to user something like: IF(MainContext/DeadLineBeforeDays > 100, ("AAA"), ("BBB"))

Otherwise, yes, you have to write a custom EJB function.

Former Member
0 Kudos

Hi Kirill,

thank you so much for your help.

Currently I am using v. 7.1, but I will move to v. 7.2 soon.

So the information you provided is really helpful to me.

Regards,

Livio.

Answers (1)

Answers (1)

ivo_simeonov
Explorer
0 Kudos

Hi Livio,

The if-then-else construct is not a normal function as its input parameters are functions rather than values, so it cannot be provided as built-in function.

You can create a custom Mapping Function that evaluates your "numeric context variable " and returns either "AAA" or "BBB".

Regards

Ivo

Former Member
0 Kudos

Hi Ivo,

thank you for your helpful suggestion.

I will implement a custom Mapping Function.

I checked the documentation and, if I undestood correctly, the only way to implement such a Mapping Function is through an EJB. Am I correct?

Regards,

Livio