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 / DefaultSelectItem in a...
Power Apps
Answered

DefaultSelectItem in a combobox

(0) ShareShare
ReportReport
Posted on by 120

Hi,

 

I am using a combo box with following formula in its items.

formula : Office365Users.SearchUser({searchTerm: toEmail_1.SearchText}) 

 

And I have a gallery of emails.

So, I want my combo box to select all users whose email is present gallery.

 

Tried setting the following formula in "DefaultSelectedItems" of combobox.

formula: Gallery3_5.AllItems.email (

Note: I have some other data too in my gallery. So, I am just taking the email. )

 

Please suggest any solution.

 

Thanks In advance

 

 

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    HI @beniwal 

     

    Can you try to use the below expression in the defaultselecteditems of your combobox control:
     
    Filter(Office365Users.SearchUser(), Mail in Gallery3_5.AllItems.Mail)
     
    Hope this helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • beniwal Profile Picture
    120 on at

    hi @yashag2255 

     

    Thanks for your reply 

     

    But filter function needs 2 arguments, that's why its throwing error.

     

    we are passing 2 arguments, I don't know why it's not working?

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @beniwal 

     

    The above formula already has two arguments, first is the name of data source and second is the Condition specified, these are separated by comma.
     
    Can you try the below expression, there are certain difference in syntax because of the select regional languages.
     
    Filter(Office365Users.SearchUser(); Mail in Gallery3_5.AllItems.Mail)
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • beniwal Profile Picture
    120 on at

    hi @yashag2255 

     

    Still not working

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @beniwal 

     

    Are you getting any error? If yes, please more details around this error, maybe through a screenshot. 
  • beniwal Profile Picture
    120 on at

    HI @yashag2255 

     

    No error but nothing is getting as selected!

     

    Formula: Filter(Office365Users.SearchUser(),Mail in RecipientsGallery.AllItems.Result)

     

    RecipientGallery: contains 1 email

    Screen Shot 2019-07-16 at 2.50.18 PM.png .                                                                         

     

    combobox : Nothing is selected by default

    Screen Shot 2019-07-16 at 2.50.26 PM.png  

    Thanks,

    Mohit

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @beniwal 

     

    Can you share more details about this Gallery control, what are its items and control type? From the Name it suggests to be a gallery but as per your latest comment, it looks like a combobox.
     
    Lets debug few things, can you try to create a temporary button which you can remove after carrying out this test.
    Place this expression on the "OnSelect" property, and check if this is returning the email address that you are expecting out of your gallery control?
     
    Expression: ClearCollect(MyTestCollection,RecipientsGallery.AllItems.Result)
     
    This should return the email address to work properly, if this is not returning proper data we may need to look for something to update this gallery.
  • beniwal Profile Picture
    120 on at

    Hi @yashag2255 

     

    Ni, it's a vertical gallery, which I designed to look like Combobox.

     

    Tried your suggestion to test and it's working fine.

    Screen Shot 2019-07-16 at 3.09.02 PM.png

  • beniwal Profile Picture
    120 on at

    Hi @yashag2255 

     

    Thanks for your replies. 

     

    However, the issue is not solved yet. Can you please suggest something else?

     

    And also Please let me know how to highlight the post. So that other users can also reply 

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @beniwal 

     

    Can you verify the items property of your combobox control is set to use the same schema datasource? I carried out a test on my side with setting the default value as expected but changed the Items to another data source, in that case the result was not auto-populated.
     
    Items: Office365Users.SearchUser()
     
    Follow the below screenshot and verify if the configurations are same for your combobox:
     
    Not sure what you mean by highlighting the post, you can definitely start a new thread or tag folks whom you want to check this out.;lfk.png

     

    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard