Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Update based on selection (match function)

Dear Qlikview community,

I am using QlikView 11.00 SR2 and facing an issue.

I want to dynamically update field values based on selections I made. I found 2 threads, which are perfectly the issue I have but the Solutions uploaded there won't work at my Version.

The links are the following with the example from @Tamil Nagaraj :

Hi,

Create a variable in Variable overview window like below,

Variable Name: vSelections.

Definition :    =If(GetSelectedCount(Name)>0, Concat(Chr(39) & Name & Chr(39),  ',' ,50))

Create a button and select action as "Dynamic Update" and statement like below.

UPDATE TableName SET Value = '1123' WHERE Match(Name,$(vSelections))

Attached sample file against your sample Input.

dynamic update based on selection

The other Post @Stefan Wühl answered the same issue how to update a field after load .

I tried to download the 2 examples but they dont work. I changed Settings such that dynamic update is possible (document properties) and also wrote the code from the examples adapted to my fields.

But I think the Problem is somehow at the "Match()" function, which is supposed to be an abbrevation for the conditional clause of the concatination of the vSelections variable in the example above.

As the dynamic update is based on SQL-language when I want to Change all values of a selection to a new one, I Need to write the Statement:

Update tbl1

Set column1 = 'test'

Where column2 = 'selection1' OR column2 = 'selection2' OR column2 = 'selection3' ,...., OR column2 = 'selectionXX' ;

and the match function should write the last Statement with match(column2, $(vSelections))

where vSelections is the concat of 'selection1','selection2','selection3',....,'selectionXX'

I tried to hardcode the issue just randomly pick some fieldvalues from column1 match(column1, 'A01', 'A02')  but this dont update my table.

Can anyone help me ? It seems match function isnt working properly.

Best regards,

Tuan

0 Replies