Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone help me with the functions which identities the reload between QMC and Qlikview Dektop?
the requirement is i have to use two different databases respectively for QMC and Qlikview Desktop reloads.
Thanks
Hari
You can do something like this.
Suppose that your QMC reload start at 7am:
If hour(now(1))=7 then
Connection to QMC Reload Database
else
Connection to QlikView Desktop Reload Database
End If
Thank you, but i need to identify the difference.
You can check the computer name using computername() and then decide on connection, like:
Another variation on the same theme:
On your server, create an include file (let's call it ServerSettings.qvs) that says something like:
SET vReloadEngine = QMC;
In your document script, do two things.
As long as you maintain that file on your server, the script will be able to make out where it's running. Whatever the name of the machine...
Best,
Peter
Thank you nice idea, but there are lots of servers, i cant maintain a file, i am looking for function to find the engine and load
That may be what you want, but that will be difficult to get.
You see, the engine that is reponsible for reloads on your server is actually a QV Desktop without user interface called QVB.exe (QlikView Batch) that still thinks its name is QV.exe.
AFAIK if you want to figure out where the reload is taking place, you may have to rely on the environment telling you. Not the engine itself.
I use for similar tasks (triggering OnOpen excel-macros which must know who is executing them) external parameter either created by small store-statements or per vbs-writing in a text-file which will be evaluated from the depending routines. After finishing the excel-macro reset this parameter to its default-value.
I think you could adapt this approach to your task whereby purely inside of Qlik I would go with the suggestions from Peter or Tresesco maybe by extending the computername() logic to a mapping (if there are really multiple server) maybe something like this:
Map:
mapping load * inline [
ComputerName, Database
Server1, DB1
Server2, DB2
...
Desktop, DBx
];
DataBase: load applymap('Map', computername(), '#NV') as DataBase autogenerate 1;
let vDatabase = fieldvalue('Database', 1);
...
- Marcus
Thank you, but i am looking for solution where unknown users and unknown servers are there, we cannot really keep track of everything, anywhere, anytime the script should identify the engine and load the respective db for desktop or server.
Currently i am using the below script to identify the servers and desktop using registry string, but if QMC is running on desktop client, it will fail.. i need something which more robust.
LET vOS = GetRegistryString('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ProductName');
Thanks
Hari.