Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Colleagues, good evening!
Has anyone faced with tasks to use wildmatch function in dynamic update?
I have very simple data set:
ID | Name | Result |
1 | Name | |
2 | 1Name1 | |
3 | Name1 | |
4 | Nam | |
5 | N |
So in DU i need to set "Done" value in Result field for those records, which met the following condition:
WildMatch(Result, '*Name*').
I read some threads about this topic (like using LIKE statement from SQL), but it doesn't give necessary result.
Could anyone advice something?
p.s. Using If statement isn't appropriate solution for my task.
Andrew.
IF(WildMatch(Name,'*Name*'),'Done') as Flag
or
IF(WildMatch(UPPER(Name),'*NAME*'),'Done') as Flag
Thanks, dear!
But i need to solve it without creating additional logic in the script.
So searching necessary records (wildmatch by Name field) should be done directly in Dynamic Update statement.
You can use the same at front end... just remove the as Flag from both sentences..
Use below as an expression
IF(WildMatch(Name,'*Name*'),'Done')
or
IF(WildMatch(UPPER(Name),'*NAME*'),'Done')
Could you show me please base on this example?
='UPDATE Main SET "Result" = ' & chr(39) & 'Done' & chr(39) & ' WHERE "Name" = ' & '1' & chr(39) & ';'
Here i'm updating records where Name=1.
Thanks.
Is this question related to your original post?
If not, I would say, raise a new question.
This is the best way to use Qlik Community, which will indirectly help other having same questions..
Thanks
Also, if you got answer of your original post, please close the thread by selection correct answer..
Would like to help you on another question..
In my original post i described exactly what i need:
1. Update DU string using some statement which does the same logic as wildmatch;
2. Do not use If statement, because it's not appropriate for my case.
You don't want to modify script.
You don't want to use If....
I don't know is there any other way, we can do it....
Let's wait for experts to come back on your query.
Honestly, I don't have any further idea about this.
Sorry dear.
Thank you for you efforts!
may be like this:
UPDATE Main SET Result = 'Done' WHERE Match(Name,$(vRef)) //also try WHERE WildMatch(Name,$(vRef))
Create a variable vRef as =concat(chr(39) & '*Name*' & chr(39))