Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using analog of WildMatch in Dynamic Update

Colleagues, good evening!

Has anyone faced with tasks to use wildmatch function in dynamic update?

I have very simple data set:

 

IDNameResult
1Name
21Name1
3Name1
4Nam
5N

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.

11 Replies
MK_QSL
MVP
MVP

IF(WildMatch(Name,'*Name*'),'Done') as Flag

or

IF(WildMatch(UPPER(Name),'*NAME*'),'Done') as Flag

Anonymous
Not applicable
Author

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.

MK_QSL
MVP
MVP

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')

Anonymous
Not applicable
Author

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.

MK_QSL
MVP
MVP

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..

Anonymous
Not applicable
Author

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.

MK_QSL
MVP
MVP

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.

Anonymous
Not applicable
Author

Thank you for you efforts!

krishna_2644
Specialist III
Specialist III

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))