Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Search for String in script

Hi All

I have a filed named 'Type' in QlikView which contains values like Abc, Abcs, Abdr, bef, ltv etc..Now that I need to write in script to return expression values such that where type contains Ab

I tried like where Type=''Ab*' but not returning any values.Please help

1 Solution

Accepted Solutions
surendraj
Specialist
Specialist

Try with

LOAD * INLINE [

Type

Abc

Abcs

Abdr

bef

ltv

]Where wildmatch(Type,'*Ab*');

View solution in original post

11 Replies
adamdavi3s
Master
Master

Hi use the wildmatch function to help you out:

if(wildmatch(Type,'AB*'),value,0)

Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.

This will help users identify the answers should they come across this thread in the future.

Anonymous
Not applicable
Author

can I have something like using where clause so that I can restrict values from script itself

surendraj
Specialist
Specialist

Try with

LOAD * INLINE [

Type

Abc

Abcs

Abdr

bef

ltv

]Where wildmatch(Type,'*Ab*');

adamdavi3s
Master
Master

You can use wildmatch in the script as well which is essentially a WHERE LIKE clause

Chanty4u
MVP
MVP

u can try wildmatch here

wildmatch( M, 'Ab*','Ab?','ab')

Chanty4u
MVP
MVP

Let vCheck='Ab*';

for text object:

=if(FieldIndex('Field',vCheck)>0, True(),False())

adamdavi3s
Master
Master

Why would you do this when wildmatch will return a true / false anyway and not require an if statement?

Anonymous
Not applicable
Author

Thank you very much it helped

Chanty4u
MVP
MVP

yes but if he can check in front end also he can get to know .