Harness, Section, and Flow Action forms
|
Use an Auto Complete control to allow the user to select a value from a possibly large set of searched text values, based on a partial string match. The system dynamically assembles and displays a list of candidate matching values after the user types one or a few characters of input.
Configure styles for the Auto Complete control in the Skin rule. See Skin form — Styles tab — Layouts — Auto Complete.
Unlike a static list (such as produced by a Local List on the Table Type fields of a Property form), the drop-down values presented by an Auto Complete control may vary from user to user and from time to time. Unlike a Dynamic Select control, the user must type at least one or a few characters to activate the control.
For example, when searching for an employee by first name, the user can type two characters such as "AL". The AutoComplete control can run an activity to create a list of employees in a Page List
structure, one page per employee, and match on the embedded FirstName field, presenting matching candidates Alan, Allan, Albert, and so on. The AutoComplete control can also use a report definition as the source of values to match.
The icon at the right of a field indicates that Auto Complete is available.
The standard section Data-Party.PartyAddress includes an AutoComplete example, for the property pyWorkState. The standard activity Data-Address.getStateList assembles the list of state codes from field value rules. Parameters to the AutoComplete control rule identify the Display Field as pyLabel
, the Text Box Size and Listing Width as 2 characters, and the Only match... option enabled. At runtime, the drop-down list appears after the user types a single letter.
For instructions on an activity-based example, see PDN article 25064 How to add an AutoComplete form to a flow action form.
The UI Gallery landing page contains a working example of this control. To view and interact with this example and review its configuration, select > User Interface > UI Gallery and select Auto Complete in the Controls group. For another use of autocomplete, see PDN article 26458 How to use the Autocomplete control to build a list.
Confirm that user requirements for the text box field are best met by an AutoComplete control rather than alternatives.
Determine the name of the report definition or clipboard page (a Page List
or class Code-Pega-List) that is to be searched. When using a clipboard page as the source of values, determine whether the clipboard page will be available at runtime when the data is needed. For example, when the flow action or user form appears, is the work item ready present with appropriate data, or do you need to build an activity to construct it?
When building an activity, it is often useful to review and copy (using a new name) the standard activity named LookupList for the class containing the objects, if the objects are rows of a table in the PegaRULES database. Design the activity to:
Page Group
page of class Code-Pega-List, with each embedded page containing the values of the pyLabel property and of the property containing the text values to be displayed (the display field).pyDataSourcePageName
containing the fully qualified name of the Page Group
page (or include a Show-Page method step for that page).2. Drag and drop the Auto Complete control
Click the down-arrow () at the right end of the Advanced control group () and select the AutoComplete control (). Drag the control. When the pointer changes shape to indicate that you can drop the layout, release the mouse button.
3. Complete the Cell Properties panel — Top fields
Complete Cell Properties panel, starting with the top fields.
Your updates to this panel can update the rule form immediately or upon clicking Apply, depending on the Property Panel settings in your Edit preferences. See Setting your preferences. If the panel is pinned(), the wireframe on the rule form changes immediately to reflect your inputs. If the panel is not pinned(), click Apply to apply your inputs.
Field |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Property |
Select or type a property reference that identifies a single text value that has a dynamic set of possible values. Click the pencil icon () to review the property (if the reference is to an existing property in the Applies To class of this rule or a parent of that class). If the property is not found, the New dialog box for the property form appears. You can reference properties on any page identified on the Pages & Classes tab, using the normal notation pagename.propertyname for pages other than the page corresponding to the Applies To class of the rule. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Control |
Accept the supplied value AutoComplete. Click the magnifying glass icon () to enter parameters. Click the magnifying glass icon () to the right of the Format field to enter parameters for the AutoComplete Control rule. Complete the Parameter fields; then click Save.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Behavior |
Optional. Leave blank if no dynamic form actions to other parts of the form are to occur based on user updates or values for this field. To establish a dynamic form action based on user updates or values for this field, click the magnifying glass icon () to open the Client Event Editor. Complete the Client Event Editor to select an event ( Click the help icon ( ) on the Client Event Editor for assistance. For general information on this capability, see Harness, section, and flow action forms Help — Client Event Editor. Event support is available for harnesses, sections, or flow actions that have Generate for set to |
4. Complete the Cell Properties panel — General tab
5. Complete the Cell Properties panel — Advanced tab
The standard control AutoComplete accepts the parameters described above. This control is based on the autoComplete
JSP tag, which offers additional advanced options including control over timing. See autoComplete JSP tag.
This feature depends on AJAX technology.