Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

AutoComplete triggers a search on a single keystroke

SA-79999

Summary



The requirement is to add a delay to the out-of-the-box AutoComplete control before the search initiates a server request to populate it. This requirement is such that the user can complete typing in the field before the list is populated. After four characters are typed, the search triggers a REST Request to populate the control. Performance degrades since every keystroke after four characters triggers a request.


Error Messages



Not Applicable


Steps to Reproduce

  1. Configure an AutoComplete field with the Minimum character search set to 4.
  2. Enter four characters in the field.


Root Cause



AutoComplete control initiated the REST API to obtain the search results after the minimum number of characters are typed. The default delay to trigger this call is 250ms and is not configurable.


Resolution

  1. Apply HFix-53425.
  2. Add the below lines of code to the UserWorkForm:

    <script> 
    pega.u.d.autocompleteDelay=x; 
    </script>


    Here x represents the number of milliseconds before load request is initiated.

    For example,

    For a delay of one second, x=1000.
    For a delay of two seconds, x=2000, and so on.

Published January 6, 2020 - Updated December 2, 2021

Was this useful?

100% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

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