I'm working on creating a custom report using OTA and am running in a slight issue.
I'm able to do the following:
'Set the filter values Set bugfilter = bugfactory.Filter bugfilter.Filter("BG_USER_TEMPLATE_01") = "My Data"
and I get the results back that I would expect, however what I'd like to do is:
bugfilter.Filter("BG_USER_TEMPLATE_01") = "My Data" or "EMPTY DATA"
basically, I want this filter to look at the field BG_USER_TEMPLATE_01 and return values that have specific data or that don't have any value entered into that field. I've tried a couple random syntax for the empty portion and I'm just not getting anywhere. Can you help me out??
Answer by Jafar · Dec 12, 2014 at 06:41 PM
Try the following:
bugfilter.Filter("BG_USER_TEMPLATE_01") = "My Data Or """""
The filter will accept a string, which is enclosed in double quotes (therefore one pair of double quotes)
To get an empty string value you would have a set of double quotes (therefore a second pair of double quotes)
In order to get VBscript to accept that you are passing an empty string, you need to escape your quotes with another set of double quote (therefore a third pair of double quotes).
So, you end up with a 1 double quote at the begining and 1 double quote at the end of the entire string, then 4 double quotes together to represent an empty string.
Excel Report - Project User Details 1 Answer