Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Preserve the Reload time

Hello All,

I have a condition in which I want to preserve the reload time , so that when the application runs again it show the last reload time.

I am attaching the sample application in which the reload time should preserve on the basis of the variable value.

Thanks in advance

Ferha Sharma

16 Replies
Gysbert_Wassenaar

Perhaps you should have a look at the Governance Monitor: https://help.qlik.com/en-US/governance-dashboard/2.0/Content/Publisher-sheet.htm


talk is cheap, supply exceeds demand
tamilarasu
Champion
Champion

Hi Ferha,

Have a look at the attached file.

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Sorry but I did not understand your coding ,as what exactly is happening in your sample app.

tamilarasu
Champion
Champion

Hi,

Before answering to your last question, can you confirm your requirement. I believe that you need to display last reload time and previously reload time in your application. Is that correct?

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Yes, I have 2 tasks for similar application and I want to show tasks reload time for the same application corresponding to tasks.

tamilarasu
Champion
Champion

The red color highlighted text in below expression is a variable which was created by me i.e Last reload date and time will perform as an ARRAY function.

Let vReloadTime = Left(Date(Now(1),'MM/DD/YYYY hh:mm:ss TT') & '|' & vReloadTime,45);


The below part is to capture the application reload time. You may ask why I am using 1 in the now function. You should check the help file for the reason.

Capture.PNG

Date(Now(1),'MM/DD/YYYY hh:mm:ss TT') - Latest reload time


In the below step, I am concatenating the latest reload time with previously stored variable values (Date & Time).


Date(Now(1),'MM/DD/YYYY hh:mm:ss TT') & '|' & vReloadTime


You can test the expression like below.


Capture.PNG

Capture.PNG

As you can see, whenever you run the application the reload time will be concatenated and stored in a variable. In your case, you need to display last two reload times. So we can exclude rest of the reload times and keep only last two reload times.

For that I have manually hard coded second pipe symbol position which is 45. Hope you aware about left function.

Capture.PNG

So whenever you reload only the last two reload times will be stored and old ones will be excluded.

Capture.PNG

To display the reload times seperately in front end, I have used subfield function.

Capture.PNG

Did you reload the application and check the "Last Refresh" and "Previous Refresh" time? This is working fine as per your question.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

vlastReload gets refreshed with the reload time of the next to last load. ReloadTime(), in the UI, is the last reload.