Announcement

Collapse
No announcement yet.

Option to enable %keyword% search by default

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

  • Option to enable %keyword% search by default

    Is there an option to enable %keyword% search by default... if not which files to edit?

  • #2


    The end of the first section.

    Comment


    • #3
      Awesome

      /#Admin/settings
      Use 'contains' operator when filtering varchar fields
      If not checked then 'starts with' operator is used. You can use the wildcard '%'.

      Comment


      • #4
        It would be nice to have an option to prefix the % in the search as option indeed as suggested below.


        ---------------------------
        From the Espocrm.com customer portal documents/tips section :

        Open file application/Espo/Controllers/GlobalSearch.php


        Find:

        $query = $request->get('q');

        Add content below:

        $query = trim($query, '%');
        $query = '%'. $query .'%';
        Do the initial trim in case someone has already added the wildcard to the beginning or end, since this makes it a global wildcard.
        You can also do it on the record list as well by making the very simple change below.

        Open file application/Espo/Core/SelectManagers/Base.php

        Go to line 1248 and change...

        $expression = $textFilter . '%';

        to

        $expression = '%'. $textFilter . '%';

        Comment


        • #5
          So this code will basically allow using to use Filter type of search on the Global Search? Is that right?

          Comment

          Working...
          X