Skip to main content

Notifications

Community site session details

Community site session details

Session Id : hAjrZ5dkkHSu7Crtf97xZr
Power Apps - Building Power Apps
Answered

Combobox Default Selected Item not showing selected choice when in View/Edit mode

Like (1) ShareShare
ReportReport
Posted on 4 Mar 2025 23:00:33 by 44
I have a comboBox that is not showing the selected choice. I know it has something to do with the defaultselecteditem but I am having trouble finding a solution: 
 
1. ComboBox Opco - there are 4 choices that come from a Sharepoint list (called ;Gas AWC List', this list was created just for choices and cascading option for the Area Work Center Combo Box) column.
Item- Distinct('Gas AWC List',Title)
Default Selected - {Value: ThisItem.'Opco'} THIS WORKS
 
2. ComboBox Area Work Center - depending on the selection of the Opco, the Area Work Centers are filtered 
Item- Distinct(Filter('Gas AWC List',Title=comboState_1.Selected.Value),'AWC')
Default Selected - {Value: ThisItem.'Area Work Center} THIS IS NOT WORKING I have a feeling I need to make a filter or lookup for this to work?
 
In the example below, when I select Item from the Gallery, you can see the combobox for the Area Work Center is blank. 
 
The information entered in the App is stored in the SharePoint List, 'completed procedures' correctly.
This is the choice SharePoint for the two ComboBoxs (Opco and AWC)
 
Any help would be appreciated, thank you in advance!
  • WarrenBelz Profile Picture
    146,792 Most Valuable Professional on 11 Mar 2025 at 09:11:54
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    That is why I stipulated that the fields were Single Lines of Text for the code posted to work. I cannot see your data and they are obviously choice fields, so you need .Value after them.
  • Verified answer
    CU05031456-0 Profile Picture
    44 on 10 Mar 2025 at 17:56:36
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    I figured it out! The issue was with Combobox One (opco), I just needed to add the .value to the DefaultSelectedItem, as soon as I did that the 2nd combobox value immediately displayed.
     
    1st ComboBox DefaultSelectedItem
     {Value: ThisItem.'Opco'.Value}
    2nd ComboBox DefaultSelectedItem
    {Value: ThisItem.'Area Work Center'.Value}
     
     
  • CU05031456-0 Profile Picture
    44 on 10 Mar 2025 at 14:44:32
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
     
    Your suggestion is exactly how I had it set up and it doesn't work. I just wound up putting a text label over the combo box to show up when in view mode, as nothing else seems to work. At least the form looks complete when I select an entry from the gallery.
     
    Your assumptions were all correct! 
     
    I have a feeling my items are messing up? When I go into edit mode, the choice selected from the submission is showing as an extra choice? Below you can see Nstar twice. If my second combo box (Area work center) is based off the first (opco), would this be where the problem is starting?
     
     
     
     
     
    Text Label pulls over correct data for Area Work Center:
     
     
  • WarrenBelz Profile Picture
    146,792 Most Valuable Professional on 08 Mar 2025 at 21:29:27
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    I did not get a notification on your initial response.
    To summarise my thoughts, I have to assume that 
    • all of those controls are inside a Form which has the DataSource of 'Completed Procedures'
    • 'Area Work Centre' is a single value Choice field in 'Completed Procedures'
    • Title and AWC are Single Line of Text fields in 'Gas AWC List'
    • The second combo box is a single choice
    So with the Items of the second Combo Box being
    Distinct(
       Filter(
          'Gas AWC List',
          Title = comboState_1.Selected.Value
       ),
       'AWC'
    )
    This will get you a Table with the single field of Value, which is displayed in it as the choices.
    If all of the above is true, then the DefaultSelectedItems should be either
    {Value: ThisItem.'Area Work Center'.Value} 
    or simply
    ThisItem.'Area Work Center'
    If this is not working either one or more of my assumptions is incorrect or there is an issue with the Combo Box. For the second possibility, try with a Classic Combo Box and see if that works.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Suggested answer
    Michael E. Gernaey Profile Picture
    41,832 Super User 2025 Season 1 on 08 Mar 2025 at 18:57:58
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
     
    Let me start by saying I am super sick and my brain may need some more information.
     
    1. If the below gives you a scope error, then it may think that THAT box is NOT within the Gallery or form. Can you do something silly.
     
    Grab it and see if you can drag it off the form/gallery. If it drags outside of that boundary, then you need to Ctrl-X it then select your Form/gallery, make sure you are within the bounds and paste it in.
     
    2. when you type ThisItem. does it actually bring up the Object 'Area Work Center' ? or are you just typing it in and it doesn't work?
     
    3. Are you sure that based on your items property that you aren't accidentally filtering it out?
     
    4. How does it have a value, if you are dynamically setting it based on another drop downs selection VERSUS actually grabbing it from the Selected Item in the gallery
  • Suggested answer
    CU05031456-0 Profile Picture
    44 on 05 Mar 2025 at 15:04:32
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    Neither one of those worked either -
     
    "This formula uses scope, which is not presently available for evaluation"
     
    [{Value: ThisItem.'Area Work Center'.Value}]
     
    {Value: ThisItem.'Area Work Center'.Value}
     
    [{Value: ThisItem.'Area Work Center'}]
  • Suggested answer
    vipuljain03 Profile Picture
    464 on 05 Mar 2025 at 03:54:56
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    DefaultSelectedItems expects a table (array).
     
    Modify DefaultSelectedItems property for ComboBox Area Work Center as shown below:
    Instead of: {Value: ThisItem.'Area Work Center'}
     
    Try this: { Value: ThisItem.'Area Work Center'.Value }
    OR ( if ThisItem.'Area Work Center' is already a record, you might need to wrap it inside an array)
    Try this: [{ Value: ThisItem.'Area Work Center'.Value }]
  • CU05031456-0 Profile Picture
    44 on 05 Mar 2025 at 02:29:16
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    Choice
  • WarrenBelz Profile Picture
    146,792 Most Valuable Professional on 05 Mar 2025 at 00:29:25
    Combobox Default Selected Item not showing selected choice when in View/Edit mode
    What type of field is 'Area Work Center' ?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 10

#2
LC-26081402-0 Profile Picture

LC-26081402-0 6

#3
EE-04041031-0 Profile Picture

EE-04041031-0 4

Overall leaderboard
Loading started