cancel
Showing results for 
Search instead for 
Did you mean: 

can i create a @prompt that includes '%' wildcards?

Former Member
0 Kudos

Hopefully someone can provide me with a little clarity , i've spent hours trying to find an answer and doing a little trial and error.

Basically i want to create a condition in the universe that can be plonked in the query filters in webi. This condition would bring up a prompt for a text string to be entered by the user. that captured user input would then have '%' wildcards on either end when passed back for a free text field to be searched.

e.g.

tab1.col1 like @prompt('Enter search text',A','%'+'class\obj'+'%',,)

The field is a free text field that i want users to be able to search for matching text.

so if they type 'Lion' in the prompt

they'd see entries that simply said 'Lion' and entries where 'Lion' was in the middle of a longer text string.

if there's a method of doing this in webi using the object and some clever manipulation of 'matches pattern', i'd be happy to try that instead but whatever i try fails.

p.s. i could use matches pattern and have the prompt text tell the user to 'Enter percentage (%), followed by search text followed by percentage(%) e.g. %blah%. that leaves room for user error though...

Accepted Solutions (0)

Answers (1)

Answers (1)

nscheaffer
Active Contributor
0 Kudos

You need to put your wildcards outside of the @Prompt function like this...

tab1.col1 like '%' + @prompt('Enter search text','A',,,) + '%'