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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bnelson111
Creator II
Creator II

Script Question.

New with Qlikview, can anyone help?

I have loaded a ODBC script all okay, but now wish to search using wildcard for certain text in a record set, once found enter it to a new table called Item Type, I know I’m missing something but can’t think.

if(WildMatch((ItemCode),'t*'),'Trials','Not Trials'),if(WildMatch((ItemCode),'f*'),'Finger Prints')
as [Item Type],

What i want to end up with is a table with Trials, Not Trials and Finger Prints so either can be selected by user.

Above code is given the following Tables. so how do i get Not Trials and Trials into Item Type Table? Cheers

sample 11.BMP

1 Solution

Accepted Solutions
Not applicable

Hello there, and welcome to the world of QlikView.

I think your problem is the close bracket after "Not Trials" which closes off the first "If" statement.

You might want to try something like this :

If (WildMatch(ItemCode,'f*'),'Finger Prints',

  If (WildMatch(ItemCode,'t*'),'Trials',

    'Not Trials') as [Item Type],

Good luck and keep trying

John

View solution in original post

3 Replies
Not applicable

Hello there, and welcome to the world of QlikView.

I think your problem is the close bracket after "Not Trials" which closes off the first "If" statement.

You might want to try something like this :

If (WildMatch(ItemCode,'f*'),'Finger Prints',

  If (WildMatch(ItemCode,'t*'),'Trials',

    'Not Trials') as [Item Type],

Good luck and keep trying

John

bnelson111
Creator II
Creator II
Author

Thankyou, sometimes cant see the wood for the trees. Worked 100% just needed another bracket after 'Not Trials'))

bnelson111
Creator II
Creator II
Author

Brilliant thanks, posted a thank you,