Search Popup Filter

This extension was designed to apply filter (or condition) that will limit the results user will see when selecting a record (any) from a lookup/select/search popup in VTiger. For example, say you are creating a new ticket – you select your organization and then search for the contact to be associated with the ticket, by default – you will see all contacts in the system, however with this extension, you can configure contact lookup popup to only show contacts related to the organization you already selected on the ticket.

 

Configuration


The extension is configured by going to Main Menu > CRM Settings > Search Popup Filter. The configuration panel allows to add new search popup filter as well as shows all the configured ones.

+ New Search Popup Filter: Add a new filter with specific set of conditions of choice.

List of Search Popup Filters: The list of all filters configured in the system.

 

+ New Search Popup Filter


This button in the configuration panel allows to add and configure a Search Popup Filter with the required specifications. There are following settings available to configure and optimize new filter:

1. Module : Select the module you want the search filter to work.

2. Field : Select the related field and you will see conditions show up. You will then be able to configure static filter or dynamic by “compare with parent” operator.

3. Message : Message written in this box will be shown on the search pop-up bar

4. Enable Override : The message which we set in message box will only appear if user check the override buttonn following with “Show all results”. Else, that message will not be displayed

5. Active : Toggle a search filter active/inactive.

6. Conditions : Depending upon the “Module” and “Field” chosen in respective fields, the fields will show up in the first picklist.

                First picklist : lets you select a field from the module according to the value selected in “Field” field. This is the field which gets filtered on the basis of other field while creating a new record.

                 Seconds picklist : lets you choose the condition. In addition to any standard conditions, a new dynamic condition has been added “Compare with parent module”. It allows to compare the fields between the select modules as well as parent module, then show the results on its basis.

                 Third picklist : lets you select the related record, on the basis of which the related records will be filled in the secondary related field (as in the first picklist).

7. Sort By : You can sort the results on the basis of First Name, Contact I.d etc. Moreover, you can sort the them in ascending and descending order.

8. Show advance query Box (MYSQL): If you have good enough knowledge about how SQL queries work, then you can use this option to configure Search Pop-up filter. Upon clicking this button following menu will open

 

How does it Work?


Here are some real time use cases to better understand the potential of the extension.

Use Case 1:

Let’s consider following settings are done in the “+ New Search Popup Filter”:

Module: Tickets

Field: Contact Name

Conditions – Picklist 1: (Contacts) Organization Name

Picklist 2: Compare with parent module

Picklist 3: (Tickets) Organization Name

In this setup, if you go to the Module = Tickets, add new ticket, and select an Organization, the options you will get to select a contact will be based on the selected Organization.


 

Use Case 2:

Let’s say you want to restrict users and not allow them to create tickets for unpaid organizations:

Module: Tickets

Field: Organization Status (custom field for demo purpose only)

Conditions – Picklist 1: (Organizations) Organization Status

Picklist 2: equals

Picklist 3: Active

Now when opening a new ticket, once users are to select an organization, it will only show the Organizations with status = active and hide others. That way, you can refuse the new tickets to the organizations or any other module who are unpaid or not active.


 

Case 3:

Module: Tickets

Field: Product Name

Conditional Module: Products

Conditions – Picklist 1: Product Category

Picklist 2: Compare with Parent

Picklist 3: (Ticket) Category

It will show Products with the same category as Tickets Category.

 

List of Search Popup Filters


As any other list, the list of search popup filters shows brief information about each of the configured filter. This helps to locate the required filter quickly in order to make appropriate actions:

1. Module: Name of the module of the filter is shown in this list.

2. Target Field: The “Target Field” selected during the configuration (see “+ New Search Popup Filter”) will be shown in this column.

3. Conditions: It shows all the setup conditions briefly.

4. Actions: Allows to Edit or Delete a configured filter.

5. ON/OFF: Allows to activate/deactivate a filter right from the list.