Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I´ve set some triggers in my application that should change some variables and tried both cases: "On Opening" and "OnPostRelaod". The issue is that I can see in the log file that after the scheduled relaod via the Management Console the variable hasn´t been changed to the new value. Example:
I set the following trigger to set the value for the variable "vDocumentType":
=if(SubStringCount(DocumentName(),'Test')='1', 'Test',if(SubStringCount(DocumentName(),'Live')='1', 'Live', if(SubStringCount(DocumentName(),'Development')='1', 'Development', 'Invalid File Name - Check vDocumentType')))
Then I use the variable in my binary load in my script:
Binary [$(vScriptPath)\scripting financial sales application $(vDocumentType) security.qvw];
Next my document gets a new name and includes the word "Live". Because of this my trigger should set the value of the variable "vDocumentType" to "Live" instead of "Test". The trigger is working if I manually reopen the document. I expected this to be working also automatically without having to open the document once more by hand, because I thought that in the background the management console also opens the document and then this would activate the trigger. But this is what happens:
Extraction of the log file after the scheduled reload via the Management Console:
As you can see the name is still "Test" instead of "Live". I would like to use such a function in many different ways so that the solution should include that this works automatically. Reopening of the document is not a solution because the document needs 20 Minutes to open. Any idea?
Many thanks in advance
The OnOpen and OnPostReload triggers are not fired when the document is hosted and reloaded in QV server.
I would suggest setting the variables in the script, but you cannot do that before a binary load. Have you invertstigated passing the variable as a parameter. In a batch load from QV desktop. you would use the /v switch. I think you can set a a parameter in server as well, but I don't have one available to check.
Example in desktop: qv.exe /r /vvDocumentType=Live abc.qvw
The OnOpen and OnPostReload triggers are not fired when the document is hosted and reloaded in QV server.
I would suggest setting the variables in the script, but you cannot do that before a binary load. Have you invertstigated passing the variable as a parameter. In a batch load from QV desktop. you would use the /v switch. I think you can set a a parameter in server as well, but I don't have one available to check.
Example in desktop: qv.exe /r /vvDocumentType=Live abc.qvw
Thank you!