Skip to main content

Using the search API

Suggest edit Updated on May 11, 2022

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.For example: 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.For example:

      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.Note: The pySearchString field supports domain-specific language.

      In the pyReportClassName field, enter the class within which you want to search.Note: 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.For example: 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.
What to do next: In the activity rule form, you can test the search gadget by clicking ActionsRun .
Did you find this content helpful? YesNo

Have a question? Get answers now.

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

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us