My Target is to reload my qlikview application On open.
I am using QlikView server. I have created a run macro script on open from the document settings. My code:
Then I have added this document to my source documents on the server, so each user will be able to access it from its own QlikView desktop. But the problem is that the reload code didnt work at the level of the user and even at the level of the server.
I tried all the suggestions on Community. Can anyone provide me with the right answer?
I'm not sure if I could give useful suggestions because we don't use open on server with the desktop client and therefore I have no real experience with it. Further I don't see much benefit in using it as a regular client for the users else we only allow the access over the access point (mainly per AJAX client and in a few exceptions also with the IE plugin) for the normal users. Our (just a few) power users use the desktop client with a leased licence.
Beside this I'm not sure if macro-reloads are in generally possible for the open on server approach or if it needs an EDX approach. This means also that the reload always happens within a server-context and not within a user-context which might be critically in regard to performance, stability and security because there might be multiple reloads executed at the same time (which might compete for resources, block files, conflicting with server settings like allow only one copy on the server and probably some more potential issues), the users might not have appropriate access rights to the storages and databases and reloads would also disable section access (is only executed by opening an application and a reload will load all data).
I assume that there are further things which needs to be considered and I suggest to rethink your whole concept of accessing data through the users.
Actually, what I am thinking of is that users might have new data in the database and need to access them directly using QlikView (near to live data). In this case, they are always contacting the admin in order to reload the application.
Accordingly, I have suggested to run macros on open, so when the user opens the application, it will be up to date and no need for Admin intervention. So once new records were added to the db, they have the possibility to close and reopen the document in order to refresh their app.
I was in the impression that you re opening it with Qlik desktop. For reloading you might cretae a reload button on the app itself and use EDX to trigger it as Marcus has told. I have mentioned previously as well that macros may not work on access point. You can definitely reload it using QV desktop as you have already done. For server and accesspoint purposes i would suggest you use edx to trigger it.
IMO your described scenario could be (better) covered with a server-task which refreshed the application. This task might run every n minutes - maybe by checking if new data exists - or maybe triggered directly from the db.
Another alternatively could be to use direct queries: direct-query.