Search bar filter

Learn how to create a search form, embed its picklist fields into the search bar and how to use it with in map layers, filters and list view

Sergey Shurygin avatar
Written by Sergey Shurygin
Updated over a week ago

A search bar filter is a Form powered by the automation suite that is embedded into the search bar under the filter icon. The filter's field values can be used in formulas of map layers and filters, similar to URL parameters.

Applications

While a search bar filter can be used with the Layers pane by providing additional dimension of flexibility to Mapsly's map layers and filter, it's especially useful in combination with the List view, with the Layers pane, Table view and the "Other" layer hidden, effectively controlling the content of the map and the List view. This configuration is typically used for:

  • and mobile sales reps working with Mapsly primarily through the mobile app.

Single-choice picklists can be embedded into the search bar

If your filter form has single-choice picklists, like a Distance field with fixed values 5, 10, 50 and 100 miles, such fields can be embedded directly into the search bar and any changes in the current value of any of the embedded fields would be immediately applied to the map layers/filters that are using this particular field.

By contract, when the user brings up the filter form by clicking on the filter icon, all changes are applied when the user clicks the Apply action button.

If a filter's form consists of only single-choice picklists, all of which are embedded into the search bar, Mapsly will not show the filter icon, and thus the user will not be able to bring up the filter as a pop-up form.

How to activate a search bar filter

A search bar filter is assigned to a user profile by checking the Search filter checkbox in Setup -> Profiles & permissions:

and filling in the Search filter properties:

Here:

  • in Form: select the Form that will serve as the search bar filter's form;

  • in Search bar fields: optionally, select single-choice picklists from the Form above that you'd like to embed directly into the Search bar.

How to use a filter in the formula of a map layer/filter

To use the value of a filter's field in a formula, select the Filter parameter as the right operand in an expression:

and entering the API name of the field in the Insert filter parameter pop-up:

Consider making a filter field Required, with a default value

Any Form's field without a default value will have a null ("Not selected") value when the Form is loaded, which is also true for the search bar filter. Also, if a field is not marked as Required, the user can clear the field, thus setting its value to null.

When a filter parameter has a null value, Mapsly removes the condition that uses this parameter from the formula, effectively always evaluating it to true. In some cases this may be the desired behavior that effectively considers the absence of a choice as as valid "show all" command.

However, in cases where this is not the desired behavior and a choice is required for a map layer/filter to produce valid results, in the filter form's properties mark such a field as Required and fill in its default value - this will prevent this field from ever having a null value.

Did this answer your question?