Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rename Qlikview file after reload

A qlikview app is reloaded daily, it always retrieves data from the current month .  I would like to configure a reload task to save the app with the current year and month, so the previous reloaded version of the last day of the previous months would be available on the server with the old name and would no longer be reloaded,  How can I do this?

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You can do one thing. You can execute the cmd command and create a duplicate of current file and then reload the application.

So when you duplicate it will have old data and after reload you will have a new data in your application.

The command is as below.

EXECUTE cmd.exe /c copy Test.qvw Test_Old.qvw;

This has to be the first line after global variable definition.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
maxgro
MVP
MVP

add a task after your reload

the task should copy every day your .qvw adding the month and year

LET vFromDir = 'C:\Users\folder\';

LET vToDir = 'C:\Users\folder\Temp\';

LET vFromFile = 'applicationtocopy.qvw';

LET vToFile = SubField('$(vFromFile)', '.', 1) & '_' & Date(Today(), 'YYYYMM') & '.qvw';

LET vLogFileName = 'applicationtocopy_log.txt';

LET vExecString = 'cmd.exe /c COPY $(vFromDir)$(vFromFile) $(vToDir)$(vToFile) /Y  >>  ' & '$(vLogFileName)';

TRACE vExecString=$(vExecString);

EXECUTE $(vExecString);

Anonymous
Not applicable
Author

Thanks  I will try this approach

QS21
Contributor III
Contributor III

Hi I am new to Qliksense and I have a similar requirement.. I have a report named Countryname_MMMYY  qliksense dashboard which is monthly.. so everymonth we load the data manually and rename the report once done with that reporting month names example: current report is INM_OCT21 and once reloaded, we will save as INM_NOV21

 

how shd I use the above command that you gave and where exactly do I need to mention it? Please help!!!