Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to clear some selections ?

Hi everybody !!!

I am here because I am trying to do a Macro to clear selections in a field if another is selected.

For example: I have the Field1 and the Field2.

If I have selected the Field1, I want to Clear the Field2 and vice versa.

I would appreciate your help.

Bye.

2 Replies
Not applicable
Author

Simple macros for this one.

Macro 1:

Sub ClearField1

ActiveDocument.Fields("Field1").Clear

End Sub

Sub ClearField2

ActiveDocument.Fields("Field2").Clear

End Sub

So, you should trigger each macro when one of those fields changes, if Field2 changes then trigger Macro ClearField1 and vice-versa. Macro triggers can be found on the document settings, macros tab.

Good luck,

Not applicable
Author

It Worked !!!

Many Thanks.