
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Match in Load Script - function argument
Hi!
I have a parameterized "match" function in load script. That is, I have a variable that handles arguments in the "match" function. In several places I would like it to stay that way, but for match to contain all the data for the field.
The question is, what to enter in match so that it "takes" everything?
match(XXX,'*') doesn't work, does it?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll want to use the WIldMatch() function to match all values.
WildMatch(XXX,'*')
WildMatch(XXX, 'ABC', 'DEF')
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@qlikeers When you use match function it expects to match some values that can be compared with defined field/dimension. Hence, you cannot put "*" because it will try to find "*" in the field values which will return zero records if there is no "*" in data. Instead you can use the same field as a second parameter like below
match(XXX,XXX) i.e match(FieldName,FieldName)
This will check all available values in that field matching the same values, hence it will return all the data within that field. Note: If that field value contains NULL values, it will not load the records containing NULL values. If you are expecting to load entire dataset using match, make sure that field does not contain NULL values


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll want to use the WIldMatch() function to match all values.
WildMatch(XXX,'*')
WildMatch(XXX, 'ABC', 'DEF')
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gentlemen, thank you very much for your comprehensive answers!
Indeed, I didn't think about Wildmatch.
However, I have two questions to make sure.
1. Wildmatch and match described in this way are exactly the same? 1:1?
Ex. match(XXX,'ABC','DEF') == wildmatmatch(XXX,'ABC','DEF')
Isn't there a risk that wildmatch in this case will "collect" something more?
2. What about NULL's in the case of wildmatmatch(XXX,'*')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Yes, without wildcard search ("*") in wildmatch both works exactly same. Match is preferred here for exact match. I don't think wildmatch will collect extra for exact search.
2. It will ignore NULL in this case as well, because it's NULL. It will expect some value in that field. It will consider white spaces or spaces though


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Isn't there a risk that wildmatch in this case will "collect" something more?"
- No, unless you are counting on a case sensitive match.
- Only the wildcard characters "*" and "?" will extend the match string.
- WildMatch() is a case insensitive match, Match() is case sensitive.
-Rob
