ebs.renderWithMultiSelectControl

Renders a multi-select control that allows users to populate a text attribute with a set of predefined values. The available values can be sourced from:

IMPORTANT!  
This function must be invoked from the form's Before Generate event handler. For details about the default client-side app logic events, see the code execution sequence documentation.

When applied, the attribute's original text field is replaced with the multi-select control. The attribute’s value is saved as an array-formatted string, for example:

Copy
['first choice', 'second choice', 'third choice']

Syntax

Copy
function renderWithMultiSelectControl(
  attrName: string,
  options: IMultiSelectControlOptions,
)
 
Parameter Type Description
attrName string Name of the text attribute to populate with the multi-select control.
options IMultiSelectControlOptions Data source for the selection options. Can be an option set, entity, or custom list.

Interfaces

IMultiSelectControlOptions

Data source for the values available in a multi-select control.

Copy
interface IMultiSelectControlOptions {
  availableItems?: { key: string; value: any }[];
  availableItemsSource?: {
    type: "optionSet" | "entity";
    referenceName: string;
    keyProperty?: string;
    displayProperty?: string;
  };
}
 
Property Type Description
availableItems (optional) { key: string; value: any }[] Key-value pairs for a custom list. The key is displayed in the selector, while the value is stored in the underlying text attribute.
availableItemsSource (optional) JSON Data source when the values are pulled from an option set or entity.
type string Source type:
  • optionSet - Values come from an option set.
  • entity - Values come from an entity's records.
referenceName string Name of the option set or entity used as the selection source.
keyProperty (optional) string For entity-based sources, the name of the attribute providing the stored values.
displayProperty (optional) string For entity-based sources, the name of the attribute providing the values displayed in the selector.

Examples