Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Architect
Creator
Creator

'IF', 'OR', 'WILDMATCH' in a single comment.

Somehow I am stuck with a script, and not able to figure out the meaning of the below logic.

Please explain what is the meaning of this line -

"if([Product Name] = 'Bucket' or WildMatch([Group Name],'*aa-wt*','*aa-wp*'),1,0) as _ProductFlag"

Labels (3)
1 Solution

Accepted Solutions
DavidM
Partner
Partner

For product with name 'Bucket' or group names containing strings aa-wt, aa-wp (characters can be in front, or behind that string) the ProductFlag is set 1, for all others it is set to 0

View solution in original post

3 Replies
DavidM
Partner
Partner

For product with name 'Bucket' or group names containing strings aa-wt, aa-wp (characters can be in front, or behind that string) the ProductFlag is set 1, for all others it is set to 0

View solution in original post

Architect
Creator
Creator
Author

Hi  David,

Thanks for the reply. Is there any other way to represent the same logic in code.

As I am facing some Bug while working with this line of code.

DavidM
Partner
Partner

Can you describe the mistake? As the code seems to be ok.

You can use nested if for example:

if([Product Name] = 'Bucket',1,

  if(WildMatch([Group Name],'*aa-wt*','*aa-wp*'),1,0)) as _ProductFlag