Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have a txt file that contain the string "OK".
I need to reload automatically my application when this file exists and contains "OK".
How can i do?
Thanks a lot
Francesca
Hi,
Do you want to reload the qvw file from QMC or desktop client?
Where you want to reload the file from matters.
Let us know where you want to automate the reload from
I want to reload qvw file from QMC.
Thanks
Hi,
You can reload it from QMC through Trigger option.
Documents--Source Documents--select your application--Triggers
Then choose whenever you want to reload the application automatically.
Second thing;
regarding the string contains OK...Please explain bit more whether its a field contains OK as string or some thing else.
Regards,
Ajay
1. Create a QVW file and name it as say 'ReloadYesNo.QVW'.
2. Create a variable in Variable Overview and name it as vLastFileTimeStamp and enter 1 as it's definition.
3. Edit script and paste the below script. Assuming that your .txt file name is ReloadYesNo.txt and it contains OK (just OK) if reload should happen. Otherwise contains something else. Save and reload it.
IF Num('$(vLastFileTimeStamp)')< FileTime('ReloadYesNo.txt') then
LET vLastFileTimeStamp = FileTime('ReloadYesNo.txt');
OK:
LOAD @1 as F1 //Assuming the file contains just the word OK
FROM
ReloadYesNo.txt
(txt, codepage is 1252, explicit labels, delimiter is '\t', msq);
IF Peek('F1')='OK' then
TRACE Reload should be started;
ELSE
Load * From Tab1; //Just to make the reload fail
ENDIF
ELSE
Load * From Tab1; //Just to make the reload fail
ENDIF
4. In QMC, create a task (Say ReloadYesNo) for it and schedule it to reload for every 5 minutes (depending on your requirement).
5. Make the actual QVW task to be executed whenever ReloadYesNo task reload is successful.
I don't have access to QMC now to test this. Please do through testing.
Regards,
KKR