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 / Assigning a array of i...
Power Apps
Unanswered

Assigning a array of items to a Modern dropdown control

(0) ShareShare
ReportReport
Posted on by 13

I'm hoping someone can help me troubleshoot this issue. I'm trying to assign a set of values in an array to a Modern dropdown control but I get this error message after the equal sign (=) is underlined with the RED squealy line;

Incompatible types for comparison. These Types can't be compared: Table, Table.

I would imagine that Table values should rather be comparable

The PowerFX line of Code is as follows;  drpMon_1.SelectedItems = [ "Item1", "Item2" , "Item3" ]

 

I've also attached the actual screenshot here. 

Any ideas or alternatives to achieving this will be greatly appreciated.

 

Screenshot.png
Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Are you trying to pre-populate the combobox with several selections? If so, put your array(table) in the DefaultSelectedItems property of the combobox, ensuring that the schema of the table records match the schema of the Items property of the combobox.

     

    Hope that helps,

    Bryan

  • dougydoe Profile Picture
    13 on at

    Hi Bryan, 
    Thanks for reaching out.
    I've already pre-populated the Dropbox in the DefaultSelectedItem which is fine. However, I'm now trying to update the dropdown when a certain condition is met elsewhere. So,  sort of trying to update it programmatically. Hope that makes sense. 

  • BCLS776 Profile Picture
    8,994 Moderator on at

    I'm not quite sure what you mean by "update" the dropdown, but you can put conditional logic into the Items property so that different versions of the underlying table are shown in different circumstances. An If() or Switch() statement often works in those situations.

     

    Bryan

  • dougydoe Profile Picture
    13 on at

    The conditional logic is elsewhere in the app such that, when a condition is met, I want the dropdown to be dynamically repopulated with new items. The Item property is initially populated from a choice column in a SharePoint List using the Choice Function. I'm assuming that is possible in PowerFx

  • BCLS776 Profile Picture
    8,994 Moderator on at

    @dougydoe wrote:

    The conditional logic is elsewhere in the app such that, when a condition is met, I want the dropdown to be dynamically repopulated with new items. The Item property is initially populated from a choice column in a SharePoint List using the Choice Function. I'm assuming that is possible in PowerFx


    Yes, this is possible, and keep in mind the schema of the different options for the Items property will need to match to avoid issues. For example, if the dropdown uses a single-column table with a field name of "Value", make sure the other options provide the same.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard