1539601747 Posted September 2, 2020 Share Posted September 2, 2020 HOW CAN I USE IF EXPRESSION FOR A COLUMN THAT WITH MORE THAN TWO CASES? FOR EXAMPLE case1: 0->NEW case2 : 1->FINISHED case3: 2->DELETED Link to comment Share on other sites More sharing options...
jgust Posted September 2, 2020 Share Posted September 2, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now