Print when an expression has more than one condition

Can I put multiple expressions when printing with an expression? and can tell the syntax. For instance,

(cb.flag = 'A' or cb.flag = 'B' or cb.flag = 'C') and cb.type <> 'O'

  • I need to use the OR clause with AND.

Thank.

+3
source share
2 answers

Syntax (condition) ? value1 : value2Instead of value1 and value2, there may be other restrictions.

Here is an example that uses the Java restriction:

(($F{ca} > 8) && ($F{ca} < 12) ? "near 10" : (($F{name}.charAt(0) == 'A') ? "A": "Not A" ))

These are Java expressions, so you have to be careful with ==and =.

Now part of the print ...

variable1, String ( - ) , .

( , ) . $V{variable1} , . .

enter image description here

+3

- ( $F{sex}.equals("0") ? "Male" : "Female")

0

Source: https://habr.com/ru/post/1795963/


All Articles