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 / Combobox Default Selec...
Power Apps
Unanswered

Combobox Default Selected Items - Condition

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I am facing the following problem in power apps:

 

In a combobox I have as items:

Office365Users.SearchUser({searchTerm:Self.SearchText})

 By default, the control displays the customer's mail that matches a selected item in the gal_0_Orders gallery:

Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer})

 I need to add a new condition, as the client may have an external email. When that happens, it should show that external email by default. I have tried the following, but it gives me an error because it is not a table value, but a record value:

If(
!IsBlank(
Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer}));
Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer});
{DisplayName: LookUp(External_Customer;Mail=gal_0_Orders.Selected.Customer).Mail})

External_Customer is a Dataverse table where I store the external emails of customers. 

 

Does anyone know how I could solve this?

Thanks in advance!

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,960 Moderator on at

    @aorro933 

     

    Can you try using IsEmpty please.


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • aorro933 Profile Picture
    on at

    Hello, 

     

    Thank you so much for your reply. I've tried the following:

    If(
    !IsEmpty(
    Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer}));
    Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer});
    {DisplayName: LookUp(External_Customer;Mail=gal_0_Orders.Selected.Customer).Mail})

     

     

     

    But I'm getting the error:

    "Expected a Table value. This control's property expects Table values. The rule generates Void values, which is incompatible."

     

    Also tried the next and getting the same error:

    If(
    !IsEmpty(
    Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer}));
    Office365Users.SearchUser({searchTerm:gal_0_Orders.Selected.Customer});
    LookUp(External_Customer;Mail=gal_0_Orders.Selected.Customer))

     

    Do you know what else I could try?

     

    Thanks

  • aorro933 Profile Picture
    on at

    Hello again, 

     

    I made some changes in property DefaultSelectedItems:

    If(
    !IsEmpty(
    Office365Users.SearchUser({searchTerm: gal_0_Orders.Selected.Customer})
    );
    Office365Users.SearchUser({searchTerm: gal_0_Orders.Selected.Customer});
    Filter(External_Customer; DisplayName= gal_0_Orders.Selected.Customer)
    )

     

    Now I'm not getting any error but the default item is empty (shouldn't be).

     

    The other properties of the dropdown are:

    aorro933_0-1697443949362.png

     

    Thanks in advance. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard