Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
I see,
I'm sorry if I don't well understood.
I'll try to see.
The trick is to use expansion with evaluation: $(=......)
E.g. UPDATE Table SET field1= $(vVariable) WHERE field2='$(=only( [Field2] ))'
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)