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

Setting variable based on value of DB field


evalentine

Recommended Posts

I am trying to set the value of a variable based on the value of the database field. The field is an integer and the variable is string.

I have tried :

$F{rts_status}.equals( 5) ? ($V{status}.equals( 'Closed' ):$V{status}.equals( 'Open' ))

but I am getting the error 'Invalid character constant'.

 

Any suggestions?

Thanks.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

:)

i think you have little problems with java language  :)

try this...
in the variable expression set:

$F{rts_status}.equals( 5) ?"Closed":"Open"

 

______________________________
if it works... KARMA point please!    : ) 

Link to comment
Share on other sites

if $F{rts_status} is an Integer then use:

 

$F{rts_status}.intValue()==5 ?"Closed":"Open"

 

Have you ever tasted the Italian coffe?  :)

______________________________
if it works... KARMA point please!    : ) 

 

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