Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Architect
Partner - Creator
Partner - 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 - Creator II
Partner - Creator II

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 - Creator II
Partner - Creator II

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

Architect
Partner - Creator
Partner - 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 - Creator II
Partner - Creator II

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