Jump to content

how to write this if-then-else expression?


dprogrammer

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

dreporter
Wrote:

Hi, I need little help in writing this simple expression:

if parameter1=1 then 'Show Text1'

if parameter1=2 then 'Show Text2'

if parameter1=3 then 'Show Text3'

else 'N/A'?

Thanks in advance

If you condition the printing of each of the three static text fields by

 

parameter1.equals("n")

 

where "n" is the appropriate value for that static text, that should work, no?

 

René

 

 

Link to comment
Share on other sites

The values of the parameter are numerics, i-e 1,2, and 3. Based upon the value, the expression should show appropriate text. Did you mean that I create three static fields and then show/suppress them conditionally based upon "n" value? Yes, that's what currently I am doing but I was trying to achieve same through a single expression.
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...