I have a piece of code for the identification of QlikView_admins:
- In each of my apps, there are some objects relevant for development, but not for the users (like some rulers and textboxes with comments)
=> These are all governed by a variable v_Dev (a binary variable, it is 1 or -1)
=> This variable is switched by a button
=> That button, in turn, is visible only to the admins - currently two people.
=> To avoid great effort at a later time, I have, instead of hard-coding our names in that button, listed them in an Excel_file
=> Since OSUSER() will normally not work (all the reloads are done by the server, by a server_user, not by us), I have developed a piece of code for partial_reload that we can then run and QlikViiew will identify us as admins and the button will appear.
I have a problem in that code. I will post it here.
// Erst mal werden aus einer Excel-Übersicht, die zu dem Zweck angelegt wurde, // die Namen aller QlikView-Admins geladen, denen die entwicklungsrelevanten // Objekte zur Verfügung stehen sollen. // Diese Tabellen werden bei einem Partial_Reload geladen (mit Ctrl+Shift+R), // bei dem sonst nichts geladen oder verändert wird.
I have tested in in a small template_app and I thought it was all right - but there I had an EXIT SCRIPT right after that piece of code.
Now I am testing that code in one of our live_apps. There is no EXIT here, but in a partial_reload, QlikView should only reload the tables with the keywords >Add< or >Replace< in front of the LOAD, no?
<=> Well, it seems QlikView is instead trying to reload it all and of course there are errors.
P.S.: The place in the script where an error occurs is a FOR...NEXT loop. It's in our master_calendar, so I am positively sure that it works. I don't know why the partial_reload encompasses this?
Since it seems that QlikView, in spite of the partial_reload, tries to execute the rest of the script, I wanted to introduce an IF_THEN clause with an EXIT command. I tried to use the flag_field >> Admin_yn << I had just created to avoid starting all over again by using OSUSER() - but that did not work at all. QlikView ignored it and just went straight up to the regular EXIT tab.
The partial_reload just does not seem to work reliably and as expected: I was expecting QlikView to reload ONLY the tables I had marked for a partial_reload, nothing else.
<=> Instead, QlikView seems to load these tables, then skip some others and then try to execute some loop or JOIN - it seems the partial_reload is not strictly limited to the LOAD_statements flagged with the keywords >Add< and >Replace< as is stated in the manual.