Filtering Dependent Picklist Values in ComboBox
Introduction
The Avonni ComboBox component can display a list of selectable options, including dependent picklist values. However, you may only want the ComboBox active when dependent picklist values are available.
This tutorial will guide you through enabling the Avonni ComboBox component only when dependent picklist values are set.
Prerequisites
Avonni Components must be installed in your Salesforce organization.
Basic familiarity with Salesforce Flow Builder.
A Salesforce object with a dependent picklist field set up.
Step-by-Step Guide
Step1: Creating a formula to evaluate if DependentPicklistValues
DependentPicklistValues
Explanation: This formula checks the
DependentPicklistValues
collection.If it's empty (
ISBLANK
returnsTRUE
), the ComboBox will be disabled (formula returnsTRUE
).If it contains values (
ISBLANK
returnsFALSE
), the ComboBox will be enabled (formula returnsFALSE
).
By using this formula, you ensure that the ComboBox reacts dynamically to the contents of the DependentPicklistValues
collection.
Step 2: Set up the "Disabled" Property Formula
Click on the "Avonni ComboBox" component you added.
In the right panel, locate the "Disabled" property.
Select the formula created previously:
This formula checks if the DependentPicklistValues
collection is empty. If it is empty, the ComboBox will be disabled (TRUE
). Otherwise, it will be enabled (FALSE
).
Step 3: Save and Test Your Flow
Save your changes in the Flow Builder.
Run a few tests to ensure the ComboBox is working as expected—disabled when no dependent values are enabled otherwise.
Conclusion
You've successfully configured the Avonni ComboBox component to be enabled only when dependent picklist values are set. This enhances the user experience by preventing unnecessary or invalid selections. Please don't hesitate to reach out if you have further questions or encounter any issues.
Last updated