Announcement

Collapse
No announcement yet.

Make filter show by default

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Make filter show by default

    What do I need to do, to have a filter show by default as opposed to having users select "Add Field"? This way I can have fields like "Status" show all the time as it is used. Many of our users are not technical and we have high turn over so training can be a pain.
    Last edited by Clintre; 09-23-2016, 02:31 PM.

  • #2
    Not sure what exactly do you mean. Maybe this would help http://forum.espocrm.com/forum/devel...-for-drop-down ?

    Comment


    • #3
      So here is an example...

      Right now if a user wants to have a filter on the Cases list they click the "Add Field" and choose the filter/field they want to filter by. I would like to see where we as administrators could set that by default, so if I want the "Status" filter to show all the time, we can do that.

      Comment


      • #4
        client/src/views/list.js

        See getSearchDefaultData
        It looks to metadata.

        You will need to define in clientDefs for your entity type

        PHP Code:
        "defaultFilterData": {
          
        "advanced": {
             
        "status": {
                
        "type""in",
                
        "value": ["Default""Status""Values"]
             }
          }

        Comment


        • #5
          hi, i have added below code into to the clientDefs json file of the entity, but no default filter show in the list view of the entity. Is there anything i have done wrongly?

          "defaultFilterData": {
          "advanced": {
          "jobStatus": {
          "type": "in",
          "value": ["Active", "Inactive"]
          }
          }
          }

          the field of default filter i want to show is jobStatus (an enum field) and the value are "Active" & "Inactive"

          Thanks.

          Comment


          • #6
            Hello
            It works, until you modify search data manually (or reset it).
            Hello, we have getSelectFilters function to preset search values in link field, Same way how to preset search values in list view? Please help, Thanks.

            Comment


            • #7
              Thank you.

              Comment

              Working...
              X