Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
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
Hi Marcus, Tamil,
Thank you very much! That worked.
Regards,
Venkatesh
Please close the thread by marking correct/helpful replies. So that it might helps others in future.
Actually, both worked. Greatly appreciate the help.