Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

autoComplete JavaServer Page tag

Updated on August 16, 2022

Use the autoComplete tag to present a drop-down list of candidate text values that a user can select from for an input text box. The text values can be produced by an activity or can be on a clipboard page.

At run time, the Autocomplete icon indicates that the field is supported by an autocomplete tag.

  • Unlike a Local List (defined as a Table Type on the General tab of the Property form), the list presented at run time by an autocomplete tag is not static and can vary from time to time or from user to user.
  • Unlike the Dynamic Select control, the list presented at run time need not be obtained from a Code-Pega-List structure (typically produced by querying the PegaRULES database or another database).

The standard control AutoComplete incorporates an autoComplete JSP tag, and allows you to set most attributes of the autoComplete and acDataSource JSP tags as parameters. Enter an autoComplete JSP tag into hand-crafted HTML code only in special situations where the standard control does not meet your needs.


This JSP tag begins operation after the user types two input characters. It presents a drop-down list for a text box that is 50 characters wide, highlighting the characters that match user input typed in each list element. The data is retrieved by the acDataSource JSP tag.

		<pega:acDataSource name="ACDS" type="ClipboardPage"
		sourceName="ACDatasource" clientCache="false"
		searchPropertyName="Employee" displayField="EmpName"
		partialSearch="true" ignoreCase="true"
		maxResults="true" allFields="true" />

Complete syntax

In the syntax presentations below:

  • Square bracket characters [ and ] define optional parts of the tag. Do not type the brackets.
  • JSP tag delimiters <pega and / > mark the start and end of the tag.
  • Replace any text in italics with your choice of value of that type.
<pega:autoComplete name="name"
	[highlight="true|false" ]
	[size = "nn" ]
	[sendingTimeout = "nn" ]
	[delimiter = "zzz"]
	[minChars ="nn" ]
	[listingWidth = "nn"]
	[value = "value"] >
<pega:acDataSource .... />

The name attribute is required.

name Name of this autocomplete control. You can use the keywords $THIS-NAME or $SAVE (saved variable name) as the value of this attribute.
delimiterOptional. Character or characters to use as a separator, for optional fields. If omitted, three hyphens "---" are the delimiter.
highlightOptional. "true" if the text that matches user input is to be highlighted, "false" otherwise. Defaults to "false" if omitted.
sendingTimeoutOptional. An integer specifying the number of milliseconds delay before the drop-down list appears. If omitted, the default is 10 milliseconds.
sizeOptional. An integer specifying the width in characters of the input text box. Defaults to "50" if omitted.
typingTimeoutOptional. An integer specifying the number of milliseconds delay after the user types the minimum number of characters before the autocomplete processing starts. Defaults to 10 milliseconds if omitted.
listingWidthOptional. Width of the <div > element in pixels. If omitted, zero.
minCharsOptional. Number of characters the user must type or paste into the field before autocomplete processing starts. If omitted, the default is 1 character.
value Optional. Initial value that appears in the text box. You can use the keywords $THIS-VALUE, $SAVE (saved variable name) or reference a parameter with syntax in this field.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us