Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Default Date when clear button selected

  Hi All,

Need a macro or a solution to keep a default date as max date in application when clear button selected.

Regards

Renjith

3 Replies
christophebrault
Specialist
Specialist

if i well understood, you have a button that clear all selection ?

If it's that case, just add an action to that button to select your default date in your field Date.

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
renjithpl
Specialist
Specialist
Author

  

Sub SetClearState_Dashboard()

vDefaultDate1=DATE(Max(Date),'DD/MM/YYYY')

Set defaultDate = ActiveDocument.Variables("vDefaultDate1")
ActiveDocument.Fields("CalDate").Select defaultDate.GetContent.String

ActiveDocument.SetClearState

End Sub

renjithpl
Specialist
Specialist
Author

Sub SetClearState_Dashboard()

vDefaultDate1=DATE(Max(Date),'DD/MM/YYYY')
 

Set defaultDate = ActiveDocument.Variables("vDefaultDate1")

ActiveDocument.Fields("CalDate").Select defaultDate.GetContent.String

 

ActiveDocument.SetClearState 

End Sub