Jump to content
We've recently updated our Privacy Statement, available here ×

IF EXPRESSION


1539601747

Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

What you are looking for is the ternary operator.  The format is :

(expression) ? value if true : value if false[/code]

Here is an example of a nested ternary operator:

$P{PM_M_CAMP_ID}.isEmpty() ?            "Campuses: All Campuses"    : $P{PM_M_CAMP_ID}.contains( "* All Campuses" ) ?            "Campuses: All Campuses"    : $P{PM_M_CAMP_ID}.size() > 19 ?              "Campuses: " + $V{CampusListLast3CharFIRST} + ".." + $V{CampusListLast3CharLAST}    : $P{PM_M_CAMP_ID}.size() < 20 ?              "Campuses: " + $V{CampusListLast3CharALL}.join(", ", $P{PM_M_CAMP_ID}).replaceAll($P{psEnter Organization ID},"")    : ""[/code]

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...