This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
Discussion Board for collaboration related to QlikView App Development.
I'm having the following scenario:
In table A, I have a couple of email addresses:
In table B, I have a list of patterns:
I want to put a flag in a new column in Table A where the email addresses matches one of the patterns from Table B.
So the output would need to become:
Is there a way to flag the rows in table A based on the patterns in table B?
In my example, there are only a few patterns. In reality, there will be hundreds.
Any help would be greatly appreciated.
Thanks for all your very fast feedback ! (amazing !!)
Using some of your input, I eventually came to this, which worked out fine for me:
// Exclude email addresses matching a certain pattern
Chr(39) & Concat('*' & [Email Pattern] & '*',Chr(39) & ',' & Chr(39)) & Chr(39) AS Pattern
(ooxml, embedded labels, table is Sheet1);
let vPatterns = Peek('Pattern',0,'TableB');
wildmatch(EMAIL,$(vPatterns)) as TestUserFlag
In the TableA, the only thing I need to filter on then is anything > 0 to find out which are the addresses to be filtered out... !
Thanks again for all your support,
View solution in original post
You could try this:
Create a new field in table A, that contains all the distinct values in the patterns field, but surrounding them with the '*' character (*pattern*), and concatenate them with the '|' character:
Then, use the wildmatch function in every record of the table to flag the coincidences
try like this:
SubField(EMAILaddresses, '@' , 2) as Key,
SubField(EMAILfield, '@' ,2) as Key,
From <second table>;
If( NOT isnull(EMAILaddresses),1) as Flag
Drop table TableA;