Clarity

 View Only
Expand all | Collapse all

Removing buttons on a Filter Portlet

  • 1.  Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 11:41 AM

    Is it possible to prevent users from editing fields in the filter of a portlet?  I have a field in a filter that I have made read-only, but if a user clicks on the Clear button, the read-only filter field gets cleared as well.  Is there anyway to prevent this?

     

    Thanks,

     

    Chris



  • 2.  Re: Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 02:13 PM

    f you don't need the filter field to be showing (just applied), then this combination can prevent the filter field value from being removed during a Clear or Show All action:

     

    Image: Default value set AND Hidden checked AND Read Only checked AND Required checked

    persistent_filter_value.png

     

    In other words, I think with your current options you also just need to make it a Hidden Required filter field?



  • 3.  Re: Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 04:30 PM

    Thanks Nick.  I tried this option and the problem is that if a user clicks the Show All or Clear buttons, the defaulted values will be cleared from the filter and the portlet will display the entire data set.



  • 4.  Re: Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 06:11 PM

    With all those options I could click both of those buttons, and all the other filter fields get wiped out, but this one stayed.  Any other combination and I would get the result you had too.

     

    Which version exactly of Clarity are you using, and is there anything about your portlet you could mention?

     

    For example, the one I checked this out on above happened to be Clarity 13.3.0 (no patch) and with an NSQL query based grid portlet.



  • 5.  Re: Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 06:36 PM

    We are using version 13.3 and I am using a grid portlet as well.  I have Status field that we want to control the filter for in the portlet.  I have set the default values for the filter field and set it as Required and Read-Only.  This removed the Show All button but the Clear button remains and ends up allowing for the same functionality as the Show All button.



  • 6.  Re: Removing buttons on a Filter Portlet

    Posted Feb 12, 2015 10:29 AM

    I don't mean to insist, but you didn't mention in your reply if you were also setting the filter field to hidden as well.  So in order for it to work for me (though I only tried it with a text field, if you're using a lookup I will try that too), I had to set everything at the same time: required + read only + hidden + providing a default

     

    Any other combination didn't appear to work for this purpose though, and with this combination both the Show All and Clear buttons stay present.



  • 7.  Re: Removing buttons on a Filter Portlet

    Posted Feb 12, 2015 11:33 AM

    I have tried this combo as well and found that this still allows for the filter to be cleared and then a user can also use the "Show All" button to show the full data set.



  • 8.  Re: Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 07:15 PM

    Is it like, you have only one filter, which is defaulted and made read only? Then there shouldn't be show all button and if you "Clear" and then click on filter, you should get an error message. Please check the 13.3 patch version.

     

    We are on 13.3 patch 8 and this functionality is working as I explained.

     

    Regards,

    Sree



  • 9.  Re: Removing buttons on a Filter Portlet

    Posted Feb 11, 2015 09:45 PM

    Sree,

     

    In this portlet I 3 filters.  One is read-only andthe other 2 are editable.  I have tried what you suggested on another portlet that has only 1 filter and if I click "Clear" the entire data set is still shown.  Here is our version info 13.3.0.286 010 27.



  • 10.  Re: Removing buttons on a Filter Portlet

    Posted Feb 12, 2015 12:03 PM

    This may then be a problem you will only get to overcome fully when you have an opportunity to upgrade to 14.1 or higher.  I found the following defect that had been reported on 13.2 and 13.3 which appears to not be possible to reproduce in 14.1+ anymore, and once resolved via upgrade could be giving you the result you were after:

     

    CLRT-73843 The "Clear" button in a portlet filter, clears the content of a read-only field

     

    Steps to Reproduce:

    1. Go to the project list

    2. Through Actions > Configure, go to the List Filter section > Fields

    3. Go to the properties of any field on the filter section, let say Manager

    4. Set a default value, enable it as Required in Filter and Read-Only in Filter

    5. Save changes and get back to the project list

    6. The Manager field contains a default value, it is required and read-only

    7. Click on the Clear button.

     

    Expected Result: The manager field is still filled in as it is read-only and the filter action works 

    Actual Result: The manager field is blank and an error is thrown if filtered: "All required fields need to be filled out"



  • 11.  Re: Removing buttons on a Filter Portlet

    Posted Feb 12, 2015 12:41 PM

    That is good catch Nick.

    We are 13.3 patch 8 and is not experiencing this issue. May be our luck  



  • 12.  Re: Removing buttons on a Filter Portlet

    Posted Feb 12, 2015 02:52 PM

    Are you using an object based portlet or a query based portlet?  I am using an object as the data provider for the portlet in question.



  • 13.  Re: Removing buttons on a Filter Portlet

    Posted Feb 12, 2015 05:10 PM

    We are using query based portlet.