Page 1 of 1

Databand Filter

Posted: Tue Dec 09, 2014 7:59 pm
by TimWoods
I have a databand that I'd like to filter based on the contents of a variable (ceIncludeFutureCharges), which contains the word True or False. Using that variable, I need to compare two fields that are numeric and contain a 4 digit year (ChargeYear and OfficeYear). If the variable is False, I want to return all the charge years. If the variable is True, I want to return only the charge years that are less than or equal to the Office Year.

I'm trying to make something like this work
(if(ceIncludeFutureCharges=="False")
ChargeYear<=OfficeYear;
else
ChargeYear<=9999

How does an expression in a databand filter need to be constructed in order to make this work?

Re: Databand Filter

Posted: Wed Dec 10, 2014 6:31 am
by HighAley
Hello.

You could use any C# expression for filtering.
The specified code is not C# code.
Maybe next code will work:

Code: Select all

(ceIncludeFutureCharges=="False" && ChargeYear<=OfficeYear) || ceIncludeFutureCharges=="True"
Thank you.

Re: Databand Filter

Posted: Thu Dec 11, 2014 7:26 pm
by TimWoods
That worked. Thanks.

Re: Databand Filter

Posted: Fri Dec 12, 2014 5:14 am
by Andrew
Hello, Tim.

Great! Thank you for letting us know about this.

Have a nice day!