Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Expression always returns true
Expression always returns true [message #1834231] Thu, 05 November 2020 10:50 Go to next message
gale weinstein is currently offline gale weinsteinFriend
Messages: 10
Registered: October 2020
Junior Member
Hi,
I am using this expression while it always returns true, regardless of the content.
What's the issue with my code?

My script:

if(this.getRowData().getExpressionValue('row[Vanilla_Options_List]'.indexOf("CAD-AUD")!=-1))

this.getStyle().backgroundColor="green";
Re: Expression always returns true [message #1834233 is a reply to message #1834231] Thu, 05 November 2020 11:21 Go to previous message
gale weinstein is currently offline gale weinsteinFriend
Messages: 10
Registered: October 2020
Junior Member
The issue was that I had to put the closing bracket after getExpressionValue and not at the end:
if(this.getRowData().getExpressionValue('row[Vanilla_Options_List]').indexOf("CAD-AUD")!=-1)
Previous Topic:birt 2.1.2 问题 maximo7.1
Next Topic:BIRT 2.1.2 and MAXIMO 7.1.4 : org.xml.sax.SAXParseException: Premature end of file.
Goto Forum:
  


Current Time: Thu Apr 25 10:12:40 GMT 2024

Powered by FUDForum. Page generated in 0.02409 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top