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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic Update, update row on selected field

Hi,

I'm trying to write a dynamic update similar to this:

UPDATE Table SET field1= $(vVariable) WHERE field2='23';

But instead of the number in the where statement i want it to be a selected field. How do i do this? I've tried getfieldselected and the concat function but i didn't get it to work.

Thanks!

//A.

5 Replies
Not applicable
Author

Hi,

could you please explain if you're talking about script or setanalysis.

I don't understand where do you want to use that expression.

Regards

Giampiero

Anonymous
Not applicable
Author

sorry.

it's in the action "dynamic update" in my case, this action is set to trigger on a button click. I'm using QlikView 11 where dynamic update is available in an action without the need to write a macro for it.

Not applicable
Author

I see,

I'm sorry if I don't well understood.

I'll try to see.

Not applicable
Author

The trick is to use expansion with evaluation:  $(=......)

E.g. UPDATE Table SET field1= $(vVariable) WHERE field2='$(=only( [Field2] ))'

sebastiandperei
Specialist
Specialist

Hi,

I Don't really know in witch part you want to put the selection, but in "Macro World", the selection is referenced by:

ActiveDocument.Fields("Field").GetPossibleValues,

ActiveDocument.Fields("Field").GetSelectedValues or

ActiveDocument.Fields("Field").GetMemberValue(3) (the  3 could be anyone, if selection has more than one)