API – filter multiple value
Question ID: 105751
0
0

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

Marked as spam
Posted by (Questions: 122, Answers: 3)
Asked on December 12, 2014 6:40 pm
35 views
Answers (1)
1
Private answer

Try the following:

bugfilter.Filter(''BG_USER_TEMPLATE_01'') = ''My Data Or ''''''''''

1. The filter will accept a string, which is enclosed in double quotes (therefore one pair of double quotes)

2. To get an empty string value you would have a set of double quotes (therefore a second pair of double quotes)

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

Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on December 12, 2014 6:41 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top