Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

ReloadTime

Hi,

I'm struggling trying to figure out the problem with this vbscript -

Sub ReloadOnOpen

  if (Date() > ReloadTime()) Then

      ActiveDocument.Reload 

    end if

End Sub

I get the error message - "Type mismatch: 'ReloadTime'.  I've seen other posts where the ReloadTime function has been used and so it ought to work.  Am relatively new to qlik and would appreciate any suggestions?

Thank you.

1 Solution

Accepted Solutions

Re: ReloadTime

Reloadtime() isn't a valid vbs-function - you need to adjust to this example from the APIGuide.qvw:

set docprop = ActiveDocument.GetProperties

msgbox docprop.UtcLastReloadTime

- Marcus

5 Replies

Re: ReloadTime

Reloadtime() isn't a valid vbs-function - you need to adjust to this example from the APIGuide.qvw:

set docprop = ActiveDocument.GetProperties

msgbox docprop.UtcLastReloadTime

- Marcus

Re: ReloadTime

Hi Venkatesh,

I have not tested the below code but hope this will work.

Sub Test

ReloadDate = ActiveDocument.Evaluate("Date(ReloadTime(),'DD/MM/YYYY')")

Today = ActiveDocument.Evaluate("Date(Today(),'DD/MM/YYYY')")

If Today > ReloadDate Then

ActiveDocument.Reload

Else

Msgbox "Application has already been reloaded for today!"

End If

End Sub

Not applicable

Re: ReloadTime

Hi Marcus, Tamil,

Thank you very much!  That worked.

Regards,

Venkatesh

Re: ReloadTime

Please close the thread by marking correct/helpful replies. So that it might helps others in future.

Not applicable

Re: ReloadTime

Actually, both worked.  Greatly appreciate the help.

Community Browser