To create and configure search-result actions for a given search-tab context:
1. Go to the Search Tabs page for the site and site level at which your search-result action will apply. See “Search-Tab Configuration and Inheritance” for details.
2. Click on the search tab to which you want to add the search-result action and select Configure Search Tab from its action menu. This opens the Search Tab Configuration page.
3. Under the Other Settings heading, select the Search Result Actions link. This brings you to the Search Result Actions page.
The Search Result Actions page lists the actions that apply to your selected search tab and site level; the list indicates which of these are inherited and/or customized. Use the controls here to configure which actions will be available at the current level and below and to configure each available action.
• Click on the Add Action button in the toolbar to create a new action.
• To configure an existing action defined at the current site level, click on one of the listed actions to open its action menu and select Edit Action.
• To customize an action inherited from a parent level (and break the inheritance so that settings at the parent level no longer affect the current level), click on one of the listed actions to open its action menu and select Overwrite Action.
• To delete an existing action created at the current site level, click on one of the listed actions to open its action menu and select Delete.
When you are editing, copying customizing or creating an action, you will be working on the Edit Search Result Action, Copy Search Result Action, Overwrite Search Result Action or Add Search Result Action page (respectively), each of which includes the same collection of settings.
Figure: Search-result action configuration settings
The following settings are available on the Add/Edit Search Results Actions page.
• Name and Description: enter an ID, name, and description of the action. This is how the users will identify the action in the result-action menu and also how they are identified on the Search Result Actions page.
• Action Group: Select the action group to which your action should belong. To add a new group, click on the New Group link.
• Action Icon: if you would like to include a small icon in the action menu, then enter a URL to a graphics file here. This is optional.
• Required Conditions: Use this field to establish the conditions necessary for the current action to be shown. Use the Search & Preview search syntax to build the query; each result that matches the resulting query will display the current action in its action menu. Often, your query will test to make sure each of the managed properties required for the Action URL has a value for the current result. For example, “ItemGUID=*” will check to make sure that the managed property “ItemGUID” exists (this is a very typical condition).
• Target Audiences: Use this setting to limit the types of users that will see the current result action. Enter one or more audience names (separated by semicolons) to limit the audiences to which the current action will be shown. Leave this setting blank to show the action to all users. See also “Target Audiences in Search & Preview” for details about this setting and its helper controls.
|OSR_ViewProperties()||Navigates to the document library where the document lives. This method may therefore not be invoked on documents that are not living in a SharePoint document library.|
|OSR_AddAlert()||Creates a new alert for change to the selected search result item.|
|OSR_AddToMyLinks()||Adds a single search result item to the user’s personal link collection on my site.|
|OSR_ViewDetails(filename)|| Navigates to the Search & Preview details page that will show more details for a single result item. The relative URL of the details web part page must be specified as a parameter.
For example: OSR_ViewDetails(‘DefaultDetails.aspx’)
Need more help with this?
CONTACT US ON OUR HOMEPAGE ...