Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm using DynamicUpdateCommand inside a macro in this way:
sub addOrder
set choosen = ActiveDocument.Fields("NUMORD").GetPossibleValues
for i = 0 to choosen.Count - 1
set result = ActiveDocument.DynamicUpdateCommand("UPDATE * SET CHOOSE = 'S' WHERE NUMORD = '" & choosen.Item(i).text & "' " )
if result = false then
MsgBox result.ErrorMessage
end if
next
end sub
Dinamic Data Update is enabled.
It works, but, when I close QlikView and reopen it, it doesn't work anymore. Reloading doesn't affect it.
I empirically realized that to make it work again I need to change something in the UPDATE, for example turning the '*' into 'MYTABLE'.
I can I solve this weird issue? Maybe is it connected with RAM and way of saving .qvw to the file system?
Many thanks!
I worked more on it and I realized that to make DynamicUpdateCommand work again I only need to save the document (Ctrl+S)... I don't know why!
I'm doing it programmatically on document opening, with this workaround:
sub reactivateDynamicUpdateCommand
' I know, it's weird
'... but needed to reactivate DynamicUpdateCommand functionality after a restart
ActiveDocument.Save
end sub
It works, even if a better solution would be appreciated. Thanks!