Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Clear other fields

Hi I have a listbox(Listbox1) with values Sheet1,Sheet2,Sheet3. Based on selection a new sheets appears.

I have an issue whenever I select Clear all , Selections should not apply on my Listbox1.

In sheet properties I have tried Clear other fields action but it does not work.

Please suggest on how can resolve this without using buttons.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I edit Sridhar's solution.

You have to change the condition on all the tabs.

Is this what you are looking for?



View solution in original post

11 Replies
SunilChauhan
Champion II
Champion II

in list box properties-> general-> ALWAYS ONE VALUE SELECTED-> CHECK IT

hope this helps

Sunil Chauhan
Not applicable
Author

I have already selected ALWAYS ONE VALUE SELECTED. Whenever i'm using clear selection it is navigating to Sheet3.

Miguel_Angel_Baeyens

Hi,

Clear All does exactly what it says, so it's irrespective fo the number and name of the fields in your data model. But if waht you want is to keep all three sheets hidden in the Clear All button is clicked, you can set a conditional like the following, to make the user select one, two or all values in the field rather than clearing selections and showing all three sheets. I'm assuming that the name that stores the Sheet values is "Show", and possible values are "Sheet1", "Sheet2", and so. So in the sheet Properties, General, Conditional

=Match('Sheet1', $(=Chr(39) & GetFieldSelections(Show, Chr(39) & Chr(44) & Chr(39), Count({1} TOTAL Show)) & Chr(39)))

And repeat this same condition for each possible value of Show. This will show the sheet when one or more values are selected in the field "Show", but when clicked "Clear All" all three sheets will become hidden.

If you mean you want to keep visibility then you need to use variables instead of fields so when Clear All is clicked, variables keep their values. You can easily create a new variable vSheetNames in the Settings menu, Variable Overview, storing all possible values:

'Sheet1','Sheet2','Sheet3'

However, this will only allow you to select only one sheet visible at a time, since variables cannot store more than two values.

Hope that helps.

Miguel

Anonymous
Not applicable
Author

Miguel Angel Baeyens wrote:

If you mean you want to keep visibility then you need to use variables instead of fields so when Clear All is clicked, variables keep their values. You can easily create a new variable vSheetNames in the Settings menu, Variable Overview, storing all possible values:

'Sheet1','Sheet2','Sheet3'

However, this will only allow you to select only one sheet visible at a time, since variables cannot store more than two values.

Hope that helps.

Miguel

What you could do (assuming you start with sheet1 and want to add sheets) is use a number for this variable

Like: vNumbersOfSheets=1

Create an input box voor this (or slide) where you can fill in the numbers of sheets you want to see.

Then use conditional show on the sheets

=vNumberOfSheets >=2

Take look at the atteched file for an example.




Miguel_Angel_Baeyens

Hi Dennis,

I thought as well about using numeric values instead, but this will only allow you to select consecutive numbers of sheets, but not Sheet1 and Sheet3 only (no Sheet2), or Sheets 1 and 2 but not Sheet3. In this case, only a field (either linked to the data model or as a logic island) can be used.

Otherwise, using a button or an action somewhere seems to me the solution.

Regards,

Miguel

Not applicable
Author

Thanks for your reply but my issue is still there.

I have attached a test file which consists 4 sheets(Main,Sheet1,Sheet2,Sheet3).

I have used conditional show sheet option inorder to display sheets.

Issue is when I'm selecting Sheet1 and clicking on Clear All  my  Sheet1 vanishes and navigates to Main sheet . But requirement is Clear all should not apply on my field A and Sheet1 should be still active even after using Clear All.

Attaching a test file here.

sridhar240784
Creator III
Creator III

Adding one more condition on in sheet1 may help you.

=='Sheet1' or if(GetSelectedCount(A) < 1 ,1,0)

Have a look at the attached application.

-Sridhar

Not applicable
Author

Hi Sridhar

              Thanx for your replay its working for sheet1 only and from sheet2 and sheet3 if i click  clear all still its navigating to main sheet.

Miguel_Angel_Baeyens

Again,

Although I cannot open files right now, you cannot use "Clear All" to "Clear All except for": if that's a field it will be cleared. Actually, you don't want "clear all", you want to clear some fields, and that's what the actions are for (among many other things).

You may even use bookmarks to keep states between sheets, but they will require to trigger actions on certain events, either pressing a button, activating/leaving sheets...

Regards,

Miguel