Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic update using multiple selections

Hello,

I would like to use the dynamic update function based on multiple selections. I have it working for 1 selection, but when I select 2 values the update function will not work.

This is how I have done it:

I first created a variable. By clicking on a button, the variable (vPersoonsgebonden) will be set by the statement =GetFieldSelections(DisplayName). This is working correctly.

Next, I created a button that will execute the update statement:

UPDATE Users SET Type_account = 'Persoonsgebonden' WHERE DisplayName='$(=vPersoonsgebonden)';

Now, whenever selecting one value, the update function is executed correctly. Whenever selecting more than one value, the function is not executed.

Any help would be appreciated.

Thanks in advance.

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Luc,

Follow the steps below:

Variable Name:

VUpdate


Definition:

=If(Getfieldselections(DisplayName)>0,Concat('Update Users SET Type_account=' & chr(39) & 'Persoonsgebonden' & chr(39) & ' Where DisplayName=' & chr(39) & DisplayName & chr(39) , ';' & chr(13)) )

Button statement (Dynamic Update):

=VUpdate


Let me know.

View solution in original post

3 Replies
tamilarasu
Champion
Champion

Hi Luc,

Follow the steps below:

Variable Name:

VUpdate


Definition:

=If(Getfieldselections(DisplayName)>0,Concat('Update Users SET Type_account=' & chr(39) & 'Persoonsgebonden' & chr(39) & ' Where DisplayName=' & chr(39) & DisplayName & chr(39) , ';' & chr(13)) )

Button statement (Dynamic Update):

=VUpdate


Let me know.

Not applicable
Author

Works like a charm! Thank you!

tamilarasu
Champion
Champion

Glad to hear from you. Thanks settu_periasamy .


If your question has been answered, I suggest marking my reply as correct to close the thread.

Qlik Community Tip: Marking Replies as Correct or Helpful.

Have a nice day.