web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Modern ComboBox ItemDi...
Power Apps
Answered

Modern ComboBox ItemDisplayText breaking with conditional inline arrays (Error at ThisItem.Value1)

(2) ShareShare
ReportReport
Posted on by 15

Hello everyone,

I am running into a frustrating issue with the updated Modern ComboBox and Modern Dropdown controls where conditional logic seems to break the expected schema, throwing an error referencing ThisItem.Value1.

My Setup:

I have a Modern Dropdown (modernDropdown1) with options: "Option1", "Option2", and "Option3".

Depending on what the user selects, I want a Modern ComboBox's Items property to dynamically provide a specific array of text options. I am using the following Power Fx formula in the ComboBox's Items:

Switch(
    Text(modernDropdown1.Selected.Value),
    "Option1", ["Option1.1", "Option1.2", "Option1.3", "Option1.4"],
    "Option2", ["Option2.1", "Option2.2", "Option2.3", "Option2.4", "Option2.5", "Option2.6"],
    "Option3", ["Option3.1", "Option3.2"],
    []
)

The Problem:

According to the Microsoft Modern Control documentation:

"For string arrays, this property [ItemDisplayText] defaults automatically... to ThisItem.Value for string arrays"

However, when using the Switch formula above, Power Apps seems to generate an anonymous table schema underneath that it doesn't recognize. The ComboBox throws an error stating it is looking for ThisItem.Value1.

If I change the ComboBox ItemDisplayText to ThisItem.Value1, ThisItem.Value, or even try to force an explicit table schema using Table({Value: "Text"}), it either displays the literal text word "Value" for every item or continues to throw schema mismatch errors.

What I've Tried:

  1. Wrapping the dropdown selection in Text() to prevent type mismatches.

  2. Manually forcing the right-hand UI panel property to "Value".

  3. Rewriting the inline arrays into explicit Table() structures inside the Switch.

It seems like the new Fluent-themed Flyout engine in the modern ComboBox struggles to determine the schema when an inline string array is evaluated conditionally inside a Switch.

Has anyone found a workaround to use conditional arrays with the new modern ComboBox controls without having to resort to creating a pre-defined App ClearCollect collection?

Thanks in advance!

Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    If I see and understand clearly, seems like your Switch returns inline arrays that Power Apps interprets as anonymous tables with inconsistent or unexpected column names but Power Apps expects a table with a consistent column name (usually Value) for string arrays   

    So returning plain string arrays like ["Option1.1", "Option1.2"] might be wrong,  explicitly return tables with a consistent column name, for example Value. You can modify you Items formula:
     
    Switch(
        modernDropdown1.Selected.Value,
        "Option1", Table(
            {Value: "Option1.1"},
            {Value: "Option1.2"},
            {Value: "Option1.3"},
            {Value: "Option1.4"}
        ),
        "Option2", Table(
            {Value: "Option2.1"},
            {Value: "Option2.2"},
            {Value: "Option2.3"},
            {Value: "Option2.4"}
    
        ),
        "Option3", Table(
            {Value: "Option3.1"},
            {Value: "Option3.2"}
            {Value: "Option3.3"}
            {Value: "Option3.3"}
        ),
        Table() // empty table fallback
    )
     
     
    Please let me know if this helps.
     
    Thanks.
  • KP-23060911-0 Profile Picture
    15 on at

    Thank you for the suggestions. To clarify, the Switch formula technically filters the data correctly behind the scenes based on the selection, but the modern control fails to render the text.

    The core issue is that all positions in the dropdown list appear blank (the quantity of the positions is correct)

    When the ComboBox Items property contains a conditional statement (like a Switch or an If), the ItemDisplayText property breaks. Setting it to ThisItem.Value results in a schema error, and typing "Value" in the properties panel just forces the literal text string "Value" to appear for every single row.

    It seems that if the modern ComboBox receives a conditional array rather than a direct, static data source, the control's Fluent engine cannot map the underlying fields to the display text.

    Has anyone found a way to successfully pass a dynamic Switch array into a modern ComboBox without losing the text rendering capability?

    Thanks!

  • Verified answer
    KP-23060911-0 Profile Picture
    15 on at
    Right, I figured it out through collections.
     
    Your principal Dropdown/Combobox needs to create a collection with your options in OnChange.
    In your secondary Combobox Items you path over this collection name,
    In Combobox ItemDisplayText you path over ThisItem.YourCollectionColumName
     
     
    God, whoever did this, I hope you had good intentions!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard