Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Why am I getting a blank value for the selected item in the combo box from the collection?

(0) ShareShare
ReportReport
Posted on by

I receive a blank value when I use the syntax "Combobox.Selected.Result" but it starts working as expected after I choose another selection.

  • mmxupp Profile Picture
    mmxupp on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    Many thanks.

  • Verified answer
    AndrewR1 Profile Picture
    AndrewR1 1,518 on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    Hi @mmxupp you can set the DefaultSelectedItems Property to something like the following: 

    AndrewR1_0-1695805663611.png

    My Table is as follows: 

    AndrewR1_1-1695805708898.png

     

    Your code would look something like (to get the first record in your table): 

     

    First(CollectVideoName)

     

    Or if you prefer to use filter this also will work: 

     

    Filter(CollectVideoName,Name= "YourDefaultSelectedName")

     

     

    AndrewR1_2-1695805857393.png

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew

  • mmxupp Profile Picture
    mmxupp on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    mmxupp_6-1695804616372.png

     

  • mmxupp Profile Picture
    mmxupp on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    @AndrewR1 It doesn't error.

     

    Example

    mmxupp_4-1695804414596.png

    1. default

    mmxupp_2-1695804141034.png

    2. when I select

    mmxupp_3-1695804161488.png

    I want to get value by default not select.

     

     

     

  • AndrewR1 Profile Picture
    AndrewR1 1,518 on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    Hi @mmxupp ok so firstly could you send me a screen shot of the combo box with the values assigned to it? It would also be useful for me to be able to see the error message that it is giving you on the collect for your combo box table. 
    Secondly I wouldn't structure the Filter like you have I would do something like the following(My example is a movie SP list with a combo box as the genre types):  

     

     

     

    SortByColumns(
     If(
     ComboBox1.Selected.Genre = "All Items",
     Movies,
     Filter(
     Movies,
     ComboBox1.Selected.Genre in Genre.Value
     )
     ),
     "Title",
     SortOrder.Ascending
    )

     

     

     


    So in your Case it would be: 

     

     

     

    SortByColumns(
     If(
     Raised_com_1.Selected.Result= "-SELECT ALL-",
     [@Sharepoint],
     Filter(
     [@Sharepoint],
     Raised_com_1.Selected.Result in 'Raised by'.Value
     )
     ),
     "No_x002e_",
     SortOrder.Descending
    )

     

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew



  • mmxupp Profile Picture
    mmxupp on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    @AndrewR1 

     

    Capture.JPG1.JPG

     

     

    Capture.JPG2.JPG

     

  • AndrewR1 Profile Picture
    AndrewR1 1,518 on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    Hi @mmxupp can you send a screen shot of your table structure and the Items code of your gallery?  

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew

  • mmxupp Profile Picture
    mmxupp on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    @cha_cha @AndrewR1 

    I am using the table structure Combo box.

     

    I have set the default selection in Combo box, and it works to show default selection, but I want it to provide value to filter in gallery, yet it's currently returning a blank value.

     

    I tried to using dropdown, and it works, but it lacks a search feature that I need.

  • AndrewR1 Profile Picture
    AndrewR1 1,518 on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    Hi @mmxupp can you share some more information around this for me please I would need to know what the combo box table structure your using?

     

    Could you please elaborate with some more details about your use case? 

    The only way that I could replicate this is if my combo box items table looked like the following: 

    AndrewR1_1-1695737604026.png

     

    and then when I selected Andrew as there is no result for Andrew this will not show anything until I select MMXUP

    AndrewR1_0-1695737583176.png

     

    AndrewR1_2-1695737641162.png

     

    Also out of interest is multi selection on? 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew

  • cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Why am I getting a blank value for the selected item in the combo box from the collection?

    Hello @mmxupp 

     

    Try to use Combobox.Selected.Value

     

    Also, please share the Items property of your combobox if the above doesn't work.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard