Auto-Populate Single Value for Lookups
Learn about how auto-populate fills in a dependent lookup value automatically when a parent selection leaves only one valid option.
Auto-populate uses the autocomplete parameter to fill a dependent lookup attribute when only one valid value remains. A dependent lookup is a lookup attribute whose valid values depend on a parent attribute. For example, in an address form, the Country you select controls which States are available for you to choose from.
When a parent selection narrows a dependent lookup to one valid value, auto-populate fills it in automatically for you. This reduces manual selection during data entry and helps keep dependent lookup values consistent.
Auto-populate attributes
Auto-populate is controlled by the autocomplete parameter, which you add to the lookups object in the Properties object of the UI configuration file. The autocomplete parameter uses the following arrays to control which attribute URIs the behavior applies to:
includeAttributes: Enables auto-populate only for the listed attribute URIs.excludeAttributes: Enables auto-populate for all lookup attributes except the listed attribute URIs.
If you set both, includeAttributes takes precedence and excludeAttributes is ignored. This means the behavior applies only where it's useful, while manual selection remains in place elsewhere.
Example
lookups: {
autocomplete: {
includeAttributes: ["configuration/entityTypes/Location/attributes/State"],
excludeAttributes: []
}
}
For more information about the lookups object and other UI configuration properties, see Configure the Properties object.