In this example, you will design a layer search tool that searches Parcels layer based on custom Parcel Number and Block Number.
First, go to Custom Searches page, and click on New Search Button, as shown below.
From the drop-down list, select “Layer Search”, and click OK.
Now, the New Search dialog box opens; start with selecting the layer that search will target, by clicking on Set button as shown below.
Now select Parcels layer and click OK.
Type a name for the search tool in the Search Name textbox.
Now, Click on Add Filter in order to add query fields.
Select the first field; in this example ParcelNumber field will be used.
Select the operator from the operator list as shown below; in this example “is” operator will be used, since the search will work based on defined values entered by end user.
Next choose the input type, which can be:
- Drop-down List: List of defined values
- User Input: Normal Textbox
- AutoComplete Textbox: Autocomplete textbox
- Date Picker: Date Selector, for date fields
In this example, user input will be used for ParcelNumber field
Type label text that will appear on input that will appear for end user; in this example, “Parcel Number” will be used as label as shown below.
Also, type a hint for input that will appear to assist user; the following text will be entered as hint: “Please enter a valid Parcel Number”.
Click OK to save the filter.
Now, go to Result Fields tab; in order to add fields that will appear in the resulted search.
Click on “Add Result Field” to add fields that will be displayed in search result. Three fields will be added: ParcelNumber, BlockNumber, and Shape_Area.
In the search Dialog, click save to save the search tool.
Go to map view to explore the search; click on Search button, and then click on “Parcel Search” that you created.
You can see that the search you built now appears as you designed.
Now, enter a certain parcel number and click search; in this example 5 will be used as shown below.
The search will find nineteen results, and list them in results panel; You can navigate to any result on map by clicking it in the results panel.
You can also list search results using identify format you set for Parcels layer by editing search. You can do this from Results Display tab in search configuration. In order to do this, return to Custom Searches and Edit Parcel Search by clicking on Edit button.
Go to Results Display tab, and check “Use Data of Layer Identification to Display Results Instead of Fields” checkbox. Also, you can change feature highlight colors.
Now go to map, and search for parcels with number 5, and see how the results are listed according to Parcels layer identify format.
Now, edit search tool and add another filter for BlockNumber field.
Add BlockNumber field, and choose input as drop-down list; when selecting Drop-down list, a dialog appears for defining the values that will be used for populating the list. In this example, choose layer source, and select Parcels Layer, and BlockNumber column as the column in this layer that will be used to populate the list and click OK as shown below.
Now, enter the label, and click Ok as shown below.
Save the search.
Return to map and explore how the modified search will contain a textbox for entering parcel number and a drop down-list for choosing the block.
Now serach for Parcel 5 in Block 5 from the search.
The search will find one parcel, because there is only one parcel with number 5 in block 5, as shown below.