Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a macro that uses the DynamicUpdateCommand to insert records into a table. This works perfectly locally, but in accesspoint using the ie plugin (QV 11) the macro fails. I'm trying to create a field to be used as a chart dimension, but that needs to be recalculated based on the user's selections.
I have other macros that are working, so I think I have all of the settings right... including the document and server dynamic update settings.
In my google research I came across something about needing something else in the licensing in order to do dynamic updates?
Can anyone help me understand how to get this working?
I've included my macro code below...
Thanks!
Karen
*******************************************************************************************************
sub assignquartile()
set APP = ActiveDocument.GetApplication
UserID = ActiveDocument.Evaluate("OsUser()")
sqlstr = "DELETE FROM Dynamic_Dim_Table WHERE UserName = '"&UserID&"'"
SET Result = ActiveDocument.DynamicUpdateCommand(sqlstr)
APP.WaitForIdle 500
sqlstr = ""
set tb=ActiveDocument.GetSheetObject("CH67")
batchcount = 0
for rw = 1 to tb.GetRowCount-1
set x = tb.GetCell(rw,0)
line = x.number
set y = tb.GetCell(rw,4)
cumpct = y.number
'msgbox(tb.GetCell(rw,2).number)
'msgbox(cumpct)
if cumpct < .25 then
qt = "First Quartile"
else
if cumpct < .5 then
qt = "Second Quartile"
else
if cumpct < .75 then
qt = "Third Quartile"
else
qt = "Fourth Quartile"
end if
end if
end if
sqlstr = sqlstr & "INSERT INTO * (LineNo,UserName,Quartile) VALUES ("&line&","&UserID&","&qt&");"
BatchCount = BatchCount+1
IF BatchCount>6000 Then
'msgbox(sqlstr)
SET Result = ActiveDocument.DynamicUpdateCommand(sqlstr)
APP.WaitForIdle 500
sqlstr = ""
BatchCount = 0
End if
'msgbox(lineid.number)
'ActiveDocument.ShowPopup rw&" of "&tb.GetRowCount-1,.5
next
if sqlstr <> "" then
SET Result = ActiveDocument.DynamicUpdateCommand(sqlstr)
APP.WaitForIdle 500
end if
'msgbox(now())
end sub
*************************************************************************************
Hello all 🙂
We've got it working here, so I thought I'd post the solution to help anyone googling this same problem in the future:
There are settings that need to be set correctly within the document as well as on the server... here are screen shots of our settings now:
within the document:
settings > Document properties>Server tab
In the tools> edit module
on the server:
Now that the macro is working on the server, we'll start testing it with multiple users... wish me luck 🙂
Karen
Hi Karen,
I am also facing the similar issue. The ActiveDocument.DynamicUpdateCommand is not working on Access Point. Although it works locally on my PC.
I have made all the changes what you have suggested like -
- Within Document>>Settings>>Document Properties>>ServerTab
- In Macro Reference Module Security -> System Access and Current Local Security -> Allow System Access
- On Server checking all the check box under Security>>Miscellaneous
Even after making all these changes the ActiveDocument.DynamicUpdateCommand is not working.
What would be your best suggestion?
Thanks in Advance.
Hi Hiren,
We also have this problem - did you find a resolution?
Thanks
Hi Julian,
We never did resolve this… the most I could find out was that macro functionality can work perfectly on the desktop, but be unstable on accesspoint.
I’m sorry ☹ But if you find a way to make it work, please let me know!
Karen Bardon
No problem - will let you know!
It was easy when you know it
User has to be in QlikView Administrator group in Windows in order to use Dynamic Update.
Thanks - but they were!
Hi Julian,
Can once again do all the setting given in above screenshot and then try to add yourself i QlikView Administrators Group (in QMC) . I was facing the same issue. Once I added my ID in QlikView Administrators Group and now its working fine in access point.
or Just send me your application (after removing your sensitive data ) with dummy data. Will check this out.