cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Input controls and filters

0 Kudos


Can anyone tell me if is possible to create an input control against my WEBI report that will perform the action of "Contains" or "Begins With"?

I can also see you can use a filter bar on a WEBI but it is a very basic dropdown list allowing the selection of all values or a single value, can this or similar functionality offer the ability to multi select or create customer filters.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

nscheaffer
Active Contributor
0 Kudos

My initial thought was that this wasn't possible, but hey it's Friday afternoon where I am so I decided to see if I could figure this out.  I think I may have something that will work for you.

My example uses the eFashion universe.

The first step is to create a variable with no Formula to accept your filter value.  I called mine "Store Name Filter Value"...

I then created a new input control based on Store Name Filter Value...

Select "Entry field" as the Control Type with a default value of an asterisk ("*") and set the operator to "Equal to".

Next I created another variable called "Is Match" that takes the value of "Store Name Filter Value" and checks if it matches that of "Store Name" which is a dimension directly from the universe.

Finally, I added a report filter on "Is Match".

Here is the result.  You see all rows with the default value of "*" in the input control...

Now if I set my input control value to "*New*" I only the rows with the word "New" somewhere in the Store name.

As it is this is case sensitive, but you could make it case insensitive by using the Upper function within formula in the Is Match variable.

Enjoy,

Noel

0 Kudos

Thank you for this, I have implemented and is doing just what I wanted, I presume there is no way to remove the requirement for the user to enter the * before and after?

Thanks for your help

nscheaffer
Active Contributor
0 Kudos

Sure.  Remove the default value for you input control and change your formula of Is Match to tack on the asterisks like this...


=If(Match([Store name]; "*" + [Store Name Filter Value] + "*"); 1; 0)

And if you want it to be "Starts With" rather than "Contains" just removed the first asterisk like this...


=If(Match([Store name]; [Store Name Filter Value] + "*"); 1; 0)

Noel

0 Kudos

Hi

Thanks, I went with the first option which mean the user does not have to enter a * before and after, left the * as the default so that with no entry all data is returned and that works great

Thanks for your help

nscheaffer
Active Contributor
0 Kudos

Could you kindly mark my answer as "Correct"?

Thanks!

0 Kudos

Have done

Thanks

Answers (0)