Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have an interesting question.
I have a QV app that reloads regularly during the day at set intervals. It reads a csv file as its main source of information as well as other files.
I want the application to only reload when this main csv file has an indicator on the last row set to a Y. For example if the last row in Column1 is Y, then reload the entire application, but if it isn't don't reload the application, just leave the app in its current state.
I have tried using the peek function to get this to work to get this to work as follows, but when my condition is unfulfilled the application ends up having no data as I am using an exit script.
Test:
LOAD *
FROM
[Book1.xlsx]
(ooxml, embedded labels, table is Sheet1);
let marker = peek('Col1' , -1, 'Test');
exit script when marker <>'Y'; // Exit script when the file’s last row is not Y. If it is set to Y then reload the entire app
Ideally, what I want is that if the last row of Column 1 is set to Y, then reload the application and update it with new data, but if this isn't the case, just keep the app in its previous state.
Is this possible and if yes, can someone let me know how to do it?
Many thanks
I think that you will need 2 applications.
1 application will perform the test and if successful generate the batch load process command that will load the main application.
So the first application will work the way that you envisage above. If the script marker is a "Y" then execute the batch process to load your main application (which will have no tests in it). The command will be similar to:
"C:\Program Files\QlikView\qv.exe /r C:\Path\To\Document.qvw"
Hope this helps
Hi.
Usually the data is cleared on reload.
You can try to use partial reload option. It keeps the data and allows to add/replace some tables.
I think that you will need 2 applications.
1 application will perform the test and if successful generate the batch load process command that will load the main application.
So the first application will work the way that you envisage above. If the script marker is a "Y" then execute the batch process to load your main application (which will have no tests in it). The command will be similar to:
"C:\Program Files\QlikView\qv.exe /r C:\Path\To\Document.qvw"
Hope this helps
Thanks Rupert.
That's what I needed