Configuring categories for mobile search
Provide mobile app users with more comprehensive search results by limiting the scope of the search to the categories that you define. For example, you can add a search category that displays the name and email of a person that matches the search parameters.
- In Dev Studio, search for and open the pySearchConfiguration rule.
- On the Editor tab, in the Search categories section, click Add category.
- Optional:
To add a specific icon for the category, perform the following steps:
- In the new category row, click Select icon, and then click the Show image viewer icon.
- In the Image catalog window, enter an image name, and then click Find.
- Select an image that you want to use for the search category, click OK, and then click Submit.
- Optional:
To set a new default icon for search categories, perform the following steps:
- In the Advanced section, click the Show image viewer icon.
- In the Image catalog window, enter an image name, and then click Find.
- Select the image that you want to use as default for new search categories, click OK, and then click Submit.
-
In the new category row, define the parameters of the search category:
-
In the Source data page column field, enter the name of the
data page that you want to use as the source.
Note: To guarantee efficient synchronization of the data page to the mobile client, consider using a large data page as the source for search categories. Add the pyModificationDateTime and pyIsRecordDeleted properties to the data source of the data page that you want to use as the source for a search category. The mobile client then pulls the data that have changed since the last synchronization instead of the whole content of the data page. For more information about using large data pages effectively, see Creating and sourcing large data pages to store large reference data in offline-enabled applications.For example: Enter the name of the data page that contains a list of contacts that you want to use as a source for the search.
-
In the Category display name column field, enter the display
name for the category.
For example: Enter Contacts as the category name.
-
In the Title source property column field, enter a property
that displays the title of the search result.
For example: Add the property that contains the name and surname of a contact.
-
In the Description source property column field, enter a
property that displays the description of the search result.
For example: Add the property that contains the email of a contact.
-
In the Source data page column field, enter the name of the
data page that you want to use as the source.
- Optional:
To define an action that occurs when users click a search category item, perform the
following steps:
- Click Configure action.
-
Click
, and then select an action that you want to use.For example: Add the Open work by handle action that opens the object of the class by using a unique identifier.
-
Specify additional settings for the action that you selected.
For example: In the Handle field, enter
pzInsKey
as the unique identifier for the Open work by handle action to enable users to display the contact details by clicking the search result.For more information, see Available actions and conditions. - Click Submit.
- Optional: To add more categories to the list, repeat steps 2 through 6.
- Click Save.