Skip to main content

Table of Contents

Using the search API


Only available versions of this content are shown in the dropdown

Find the information you need within your application by using the search API. For example, in your banking application, you can customize the pxRetrieveSearchData activity to retrieve all results that include the word overdue, to analyze the list of pending payments.

  1. In the navigation pane of Dev Studio, click Records.

  2. Expand the Technical category, and then click Activity.

  3. In the list of activities, select the activity in which you want to invoke the pxRetrieveSearchData rule.

  4. On the activity rule form, add the pxRetrieveSearchData rule to your activity:

    1. On the Steps tab, click Add a step.

    2. In the Method field, specify the method that invokes the search API.

      Enter Call Rule-Obj-Report-Definition.pxRetrieveSearchData.
  5. Customize parameters of the search API:

    1. In the step that invokes the search API, click Expand to see method parameters.

    2. In the Method Parameters section, provide details for your search query.

      In the pySearchString field, specify single words or whole sentences that you want to find. Enter "(Car OR Bike)Rental" to retrieve records about either car rental or bike rental.

      The pySearchString field supports domain-specific language.

      In the pyReportClassName field, enter the class within which you want to search.

      The system searches for results also within child classes of the class that you specify in the pyReportClassName field.
    3. Optional:

      To enable fuzzy search, select the pyDoFuzzySearch check box, and then specify the parameters.

      In the pyFuzziness field, specify the number of one-character changes to the word to find approximate results. For the search term Bill, enter 1 to retrieve such results as Hill, Billy, or Bell.
  6. In the upper-right corner of the rule form, click Save.

In the activity rule form, you can test the search gadget by clicking Actions Run .
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us