jkeri Posted January 24, 2017 Share Posted January 24, 2017 Need help to code PRINTE EXPRESSION , and not being a JAVA coder I dont know how. IF fieldA starts with 'A' OR fieldB starts with 'B' OR fieldc starts with 'C" This is what i coded but its not working:Boolean.valueOf($F{U_TYPE}.startsWith( "Deglyc"))//Boolean.valueOf($F{U_TYPE}.startsWith( "Glyc"))//Boolean.valueOf($F{U_TYPE}.startsWith( "WB")) Link to comment Share on other sites More sharing options...
robsil Posted January 24, 2017 Share Posted January 24, 2017 Close! I'll give you the statement in 2 passes... first is paraphrased for readability...Boolean.valueOf( <STATEMENT1> || <STATEMENT2> || <STATEMENT3>)where <STATEMENT1> is $F{U_TYPE}.startsWith( "Deglyc") etc. etc. So total answer would be:Boolean.valueOf($F{U_TYPE}.startsWith( "Deglyc") || $F{U_TYPE}.startsWith( "Glyc") || $F{U_TYPE}.startsWith( "WB")) I'd have to test... but this should work also...OR($F{U_TYPE}.startsWith( "Deglyc") ,$F{U_TYPE}.startsWith( "Glyc"),$F{U_TYPE}.startsWith( "WB")) 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