Skip to content

Conversation

@jasonsiders
Copy link

This PR exposes the exisitng apex_picklistFieldMap, and allows Flow builders to manually specify picklist values for user-defined data. The component automatically converts picklist column types to the existing combobox column infrastructure when manual values are provided.

The datatable component currently supports editable picklist columns only for standard Salesforce SObjects. When using Apex-Defined objects or serialized JSON data, picklist columns render as plain text inputs instead of dropdowns because the component has no access to field metadata.

Changes

1. datatable.js-meta.xml

Added new Flow input parameter apex_picklistFieldMap. Exposes the picklist configuration to Flow builders so they can specify dropdown values for user-defined data.

The input format Follows the standard format used by lightning-combobox:

{
  "fieldName": [
    {"label": "Display Text", "value": "actual_value"},
    {"label": "Another Option", "value": "another_value"}
  ]
}

2. datatable.js

  • Converted apex_picklistFieldMap from a private property to an @api property with getter/setter
  • Added logic to transform the user-friendly array format into the internal map format.
  • Added automatic column type conversion from picklist to combobox for Apex-Defined data (lines 1735-1738)

3. ers_datatableCPE.js

Added apex_picklistFieldMap to the inputValues object and help sections. Makes the parameter available in the Custom Property Editor (Flow Builder UI) so users can configure it visually instead of manually editing Flow XML.

4. ers_datatableCPE.html

Added UI input field for apex_picklistFieldMap. Only displays when "Input data is Apex-Defined" is enabled, preventing confusion for users working with standard SObjects. We could also leave this out, if we wanted to allow subscribers to optionally customize picklist values for SObjects.

Example

image

Input Data:

[{"url":"/003QL000015eYQzYAM","name":"John Doe","title":"President","roleName":"Decision Maker","roleId":"00KQL00000LBT7R2AX","email":"[email protected]","contactId":"003QL000015eYQzYAM"},{"url":"/003QL000015eYR0YAM","name":"Jane Doe","title":"Vice President","roleName":null,"roleId":null,"email":"[email protected]","contactId":"003QL000015eYR0YAM"},{"url":"/003QL000015eYR1YAM","name":"JimBob Doe","title":"Assistant to the Regional Manager","roleName":null,"roleId":null,"email":"[email protected]","contactId":"003QL000015eYR1YAM"}]

Column Picklist Values:

{"roleName":[{"label":"Decision Maker","value":"Decision Maker"},{"label":"Evaluator","value":"Evaluator"},{"label":"Influencer","value":"Influencer"},{"label":"--None--","value":""}]}

@ericrsmith35 ericrsmith35 self-assigned this Oct 3, 2025
@ericrsmith35
Copy link
Collaborator

I will review - thanks for the submission.

@jasonsiders
Copy link
Author

@ericrsmith35 Thanks!

Looking back at this, I realized that my auto-format must have kicked in, making the diff much larger than it actually is. When I get a chance, I'll revert that styling to make it easier to grok what actually changed.

@jasonsiders
Copy link
Author

jasonsiders commented Oct 4, 2025

Formatting fixed - sorry about that! 🙂

jasonsiders added a commit to jasonsiders/LightningFlowComponents that referenced this pull request Oct 4, 2025
* attempting to resolve issue w/picklist rendering

* additional picklist fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants