Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
carolin01
Luminary Alumni
Luminary Alumni

Set Clear State & Lock fields

Hello,

In my application I´ve set a clear state that clears all fields except then one value in a list box. Now I was testing the application and noted that when I lock other fields and then press clear that even the locked fields are cleared. Is my set clear state the reason or are there other reason? Do you have examples how to solve this?

Best regards,

Carolin

1 Solution

Accepted Solutions
Not applicable

If you want multiple selections also to happen then you can use "alternate states" option. (only if you are using V11 and above)

See this from reference manual:

alternate_states.bmp

  Also, this is from reference manual:

"Pressing the Clear button affects all states. However, a menu item has been added to the Clear button dropdown"

  Unfortunately, I don't have access to V11 right now, so could not create alternate states and help you.

View solution in original post

10 Replies
Not applicable

Hi Carolin,

This is happening because of the Set Clear state only.

You can lock those fields first and then set it as a clear state. so when you click on clear those fields will automatically get locked.

Hope this helps!

carolin01
Luminary Alumni
Luminary Alumni
Author

Hi,

there is only one specific field that I want to keep and therefore I set the clear state. But now I still want my users to decide flexible if they lock fields by themselves for their own analysis. And this isn´t working anymore as the set clear state even clears locked fields that the user has locked before. For me this even looks like a bug in Qlik View, isn´t it? So I´m searching for examples what else I could do?

Best regards,

Carolin

Not applicable

If there is only one field where you want to keep the selection then instead of set clear state why not use "Always Onse Selected" ?

That way the field will have the selected value and the locked selections won't also disappear even by clicking on clear.

Not applicable

Hi.

Unfortunately QV build the "Set Clear State" like this.

You will have to either trigger other fields upon selecting "Clear" or include the lock fields as part of the "Clear State".

Also have a look at this article.

http://community.qlik.com/thread/27654

Thanks

sunilkumarqv
Specialist II
Specialist II

you can use set clear function after changing it to alternate state you can do it 

carolin01
Luminary Alumni
Luminary Alumni
Author

Because that field also should have mutiple selections. The list box enables or activates expressions in a chart. Sometimes the user would like to see one, two or three expression in the chart but always at least the total sales. This is screenshot of my listbox.

Screenshot2.png

I always want to keep total, but the user should also be able to see the plan, the year-to-date and outlook if he wants.

carolin01
Luminary Alumni
Luminary Alumni
Author

What means changing it to alternate state?

Not applicable

If you want multiple selections also to happen then you can use "alternate states" option. (only if you are using V11 and above)

See this from reference manual:

alternate_states.bmp

  Also, this is from reference manual:

"Pressing the Clear button affects all states. However, a menu item has been added to the Clear button dropdown"

  Unfortunately, I don't have access to V11 right now, so could not create alternate states and help you.

carolin01
Luminary Alumni
Luminary Alumni
Author


OK, I guess that´s the answer. I don´t have V11 yet but will keep it in mind for the future. Thank you for your quick help!