Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Button Action: Clear all except Field

Hello!

Is there any way to use a Button with an action to clear all except the selections I have in a particular field?

Thank you!!!

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Through Button...

Create a button.

Go to Action Tab... >> Add >> Selection >>  Clear All

Go to Action Tab....>> Add >> Select in Field >>

                              Field >> YourFieldName

                              Search String >> Your Field Value which you want to keep as default selection

          i.e. Field >> Customer

                Search String >> A

View solution in original post

13 Replies
Not applicable

Do you mean you want to clear all your selections except for one field? If that is the case, just add three actions to your button, the first should "Lock Field" Action under the Selection Action type and add the field you want to keep, then add an action to "Clear all", then add a third action to unlock the field.


PrashantSangle

Hi,

"delete all except the selections" means you want to delete from your database or listbox??

after clear selections you want that data back or delete permanently??

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
daveamz
Partner - Creator III
Partner - Creator III

Hi,

Use Action > Selection > Clear Other Field where Field= Except field

Best regards,

David

MK_QSL
MVP
MVP

Select any of your choice from your list box.

Go to selection menu and select Set Clear State

Now select other data from your list box.

do clear all.. you can see that your initial selection is still there.

Is this what you want?

Not applicable

Attached a sample doc with your requirement. Please look at the actions in the Button object. They are as mentioned by Grace.

It clears everything except a field called 'GP CC'

Thanks

AJ

MK_QSL
MVP
MVP

Through Button...

Create a button.

Go to Action Tab... >> Add >> Selection >>  Clear All

Go to Action Tab....>> Add >> Select in Field >>

                              Field >> YourFieldName

                              Search String >> Your Field Value which you want to keep as default selection

          i.e. Field >> Customer

                Search String >> A

microwin88x
Creator III
Creator III
Author

Thanks, it is useful, but I want to select multiple values for that field.

Should I use:

Select in Field:

     Field: Category

     Search: Cat1

     Field: Category

     Search: Cat2

     Field: Category

     Search: Cat3

Or is there any way to use

     Field: Category

     Search: Cat1, Cat2, Cat3?

microwin88x
Creator III
Creator III
Author

Thanks for your help. But the thing is that if I make another selection for the field I want to clear, it always keeps me the last selection I made, and I want to always have a selection for values A, B and C, for example.

MK_QSL
MVP
MVP

(Cat1|Cat2|Cat3)