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

IF, AND, OR Statement


fabian.fuentez
Go to solution Solved by akovach,

Recommended Posts

I am trying to to create an expression that compares dates and a string. This expression uses an and, if, and or statement. I am trying to acheive a 1 if the value returns true but always returns a null value when i run it can anyone help? Thanks.

 

Here's the expression:

IF($F{RFS_GRADE_CODE} == "EE" && $F{STU_ENR_ENTRY_DATE}.before( $P{EffDate} ) && $F{STU_ENR_EXIT_DATE} ==null || $F{STU_ENR_ENTRY_DATE}.before( $P{EffDate}) && $F{STU_ENR_EXIT_DATE}.after( $P{EffDate}) ,"1","0")
 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Hi,

It is not receommended to use '==' with String values. Use $F{RFS_GRADE_CODE}.equals("EE") instead. This is because the == operator only compares object references, while the String.equals() method compares both String's values i.e. the sequence of characters that make up each String

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...