Creating a Custom Action
It is possible to configure Custom Actions which are available based on the search results returned using the selected Search Template. This example shows how to open a Google maps page using the postcode returned from a search.
It is possible to configure Custom Actions which are available based on the search results returned using the selected Search Template. This example shows how to open a Google maps page using the postcode returned from a search.
Note: This example requires you to edit a Search Template which returns a postcode.
- Right-click on the Search Template Bank Statement in Management Studio’s tree view and select Edit from the menu.
- In the Search Template Editor, select the Data tab and click the Configure Custom Actions button to open the Custom Action Configuration window.
- Click the Add Shell Execute Custom Action button.
- A new Shell Execute Custom Action is added.
- This example uses a URL so ensure the URL button is selected.
- Enter a Name (for example Google maps) and a Description for the Custom Action in the appropriate text boxes. The Name and Description are used to create the Tooltip which is displayed when the Searching Client user hovers the mouse pointer over the active button.
- If required, you can change the icon which is used as the button to open the Custom Action. To change the icon, click Browse and navigate to the folder containing the image you want to use. Select the image and click Open to use the selected image.
- In the URL text box, enter the URL of the web page you want to open. In this example, the URL is http://google.com/maps. However, to pass Google maps a postcode (for example, SL1 6BB), you must append ?q=SL1 6BB. In this example, a search result is passed to the URL. The syntax is therefore, http://google.com/maps?q={0}.
- Next, define what is stored in {0}. On the Argument Mappings title bar, click Add New.
- Click the arrow on the Data drop-down list to display the UDI, VIDI and all the search fields in this Search Template. In this example, select Postcode.
- The Mandatory button is used to ensure the button is active only when the specified search result is available. In this example, select Mandatory so that when this Search Template is used in Searching Client but no Postcode is returned, the Google Maps button is dimmed and unavailable.
- Click the save button to save the current Custom Action. Click Close to exit the Custom Action Configuration window.
- The buttons for Custom Actions can be displayed above or below the search results. In this example, the Google Maps button will be displayed above the search results. In the Search Template Editor, select the Search Results tab and select Top on the ribbon.
- Save the Search Template to ensure the Custom Action configuration is saved.
Using a Custom Action in Searching Client
- Open Searching Client and load the Search Template which contains the Custom Action.
- Perform a Search and select a search result which has a postcode. Hover the mouse pointer over the Google maps Custom Action button to display the Tooltip.
- Click the Google Maps Custom Action button to open Google Maps with the returned postcode.