Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I'm trying to get help on this if/else statement. I don't really know what I'm doing when I need to include more than one condition. This is my statement
row8.Code.equals("AE") ? null :
row5.CONTACT_ADD3 :
row5.CONTACT_ADD3.equals(null)?
row5.CONTACT_POSTCODE :
row5.CONTACT_ADD3+", "+row5.CONTACT_POSTCODE
So I'm trying to say
If Code = AE then make the field null, else
Use contact_add3, else
If contact_add3 is null then use contact_postcode, else
use contact_add3 + contact_postcode
I'm getting the error in the screenshot. Thank you so much for help.
Use this it will work
row8.Code.equals("AE") ? null :
Relational.ISNULL(row5.CONTACT_ADD3) ? row5.CONTACT_POSTCODE : row5.CONTACT_ADD3 + ", " + row5.CONTACT_POSTCODE
Got that working now - thank you both!