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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditionally Clear list Box

Hi There

I have a basic year and month list boxes, i want to clear the month list box if there is no year selected, how can i do this ?

Thanx

1 Solution

Accepted Solutions
Not applicable
Author

You can create a macro that will fire when there is a change to the Year field. On the Trigger tab under Document Properties, you want to add a macro for the OnChange of the Year field. I'd also set up a variable (vYear) with the formula:

=GetSelectedCount(Year)


For the macro, use something like:

If ActiveDocument.Variables("vYear").GetContent.String>0 Then
ActiveDocument.Fields("Month").Clear
End If


View solution in original post

2 Replies
Not applicable
Author

You can create a macro that will fire when there is a change to the Year field. On the Trigger tab under Document Properties, you want to add a macro for the OnChange of the Year field. I'd also set up a variable (vYear) with the formula:

=GetSelectedCount(Year)


For the macro, use something like:

If ActiveDocument.Variables("vYear").GetContent.String>0 Then
ActiveDocument.Fields("Month").Clear
End If


Not applicable
Author

Thanx NMiller and for the opther post as well 🙂