Wildcard Filtering continued
By Tim Dexter-Oracle on Feb 24, 2014
I wrote up a method for using wildcard filtering in your layouts a while back here. I spotted a followup question on that blog post last week and thought I would try and address it using another wildcard method.
I want to use the bi publisher to look for several conditions using a wild card. For example if I was sql it would look like this:
if name in ('%Wst','%Grt')
How can I utilize bi publisher to look for the same conditions.
This, in XPATH speak is an OR condition and we can treat it as such. In the last article I used the 'starts-with' function, its a little limiting, there is a better one, 'contains'. This is a much more powerful function that allows you to look for any string within another string. Its case insensitive so you do not need to do upper or lowering of the string you are searching to get the desired results.
Here it is in action:
For the clerks filter I use :
and to find all clerks and managers, I use:
<?for-each-group:G_1[contains(JOB_TITLE,'Clerk') or contains(JOB_TITLE,'Manager')];./JOB_TITLE?>
Note that Im using re-grouping here, you can use the same XPATH with a regular for-each. Also note the lower case 'or' in the second expression. You can also use an 'and' too.
This works in 10 and 11g flavors of BIP. Sample files available here.