11 Replies Latest reply: Dec 28, 2011 2:49 AM by Sravanthi Jakkapuram RSS

    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.

        • Clear other fields
          Sunil Chauhan

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



          hope this helps

          • Re: Clear other fields
            Miguel Angel Baeyens de Arce



            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:




            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.