Develop Custom Property Editors Quickly with Flow Combobox

Flow Combobox is a combobox that’s intended for use by developers who are building custom property editors. It’s not something you’d drop onto a flow screen.

What it does is provide a ready-to-use combobox that’s smart enough to extract from the information provided by Flow Builder all of the available mergefields. You can use this as a CPE developer to enable admins configuring your extension to apply references that will be dynamically resolved when the flow is run.

In doing this, Flow Combobox is simply emulating, as best as possible, the functionality provided in Flow’s native property editors.

Here’s the native Flow version:

and here’s the Flow Combobox:

Using Flow Combobox
The flow designer can enter a literal value, or choose a mergefield from the list. Literals are always reported back to Flow Builder in dispatched events as having type = String. values chosen from the list will always be reported back to Flow Builder as references (mergefields).
All reference variables are surrounded by {!variableName} in edit mode, if user removes {! }, value will be converted in a literal automatically. If user types in a value that is surrounded by {! }, component will perform an attempt to find this variable in builderContext, and in case of failure will render an error and return false via reportValidity .
If selected parameter is valid builderContext variable it will be rendered as a pill with no errors.

Attributes

name (required) – unique String, that represents name of the component, used as a key in “valuechange” events.

label (required) – String used to display a label above the combobox

builderContext (required) – populates with builder context information from Flow Builder

value (optional) – String, determines the value the component will be initialized with. Must be a valid value from builderContext.

This value can be an SObject or a literal.

When an SObject is passed in, flowCombobox searches builderContext for object api name and then enables the choice of that object’s fields

valueType (optional) – String(accepts only ‘reference’ or ‘String’), that determines variable type, that is set on input in value public attribute. If not specified, will be set to “String”

builderContextFilterType (optional) – String, name of a builder context variable type such as , which will be available for select in combobox. Can be omitted, in this case flowCombobox will allow to select any variable from flowContext

builderContextFilterCollectionBoolean (optional) – Boolean, if true, flowCombobox will show only collection variables from the builderContext

Methods

reportValidity – returns false in case if component has any validation errors

Search behavior

Typing into the combobox input field will search on the apiNames of available mergefields. This search will respect filters put in place by the search string,flowContextFilterType, and flowContextFilterCollectionBoolean. If the type is “String”, however, it will also shows SObject records with a traversable “>” to allow users to traverse to fields of the SObject.

View Source

Flow Combobox is available here.

It’s also available as part of the installable FlowBaseComponents package, which is how we recommend you use it.

Subscribe
Notify of
guest
2 Comments
Inline Feedbacks
View all comments

[…] Reference […]

[…] Reference […]