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 / How to set default val...
Power Apps
Answered

How to set default value for combo box with Email ID

(0) ShareShare
ReportReport
Posted on by 158

Hi ALl,

 

I have a combobox using below code:


Office365Users.SearchUser({searchTerm:ComboBox2_4.SearchText,top:999})

 

I want to set DefaultSelected property of this combobox with a help of email ID getting by lookup using below code. But unale to see any email selected by default.


[{Email:LookUp(equipment_characteristics,equipment_id=ComboBox3.Selected.equipment_id,approval_group)}]

Output of above Lookup statement is:

ridhan_0-1684496872754.png

 

 

Please help! Thanks

 

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Write this in the DefaultSelectedItems Property of the ComboBox

     

    {
    DisplayName: "UserName",
    Claims: "i:0#.f|membership|" & Lower(First([{Email:LookUp(equipment_characteristics,equipment_id=ComboBox3.Selected.equipment_id,approval_group)}].Email),
    Department: "",
    Email: First([{Email:LookUp(equipment_characteristics,equipment_id=ComboBox3.Selected.equipment_id,approval_group)}].Email,
    JobTitle: "",
    Picture: ""
    }

  • developerAJ Profile Picture
    4,763 on at

    @ridhan 

    you can try this too

    Please use this in the DefaultSelectedItems Property of the ComboBox

     :Office365Users.SearchUser({searchTerm:LookUp(equipment_characteristics,equipment_id=ComboBox3.Selected.equipment_id,approval_group)})

     

    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. If the content was useful in other ways, please consider giving it Thumbs Up.

  • ridhan Profile Picture
    158 on at

    Hi @developerAJ and @zmansuri  - If the above lookup will show different email Id separated by ";" for ex:

    ABC@gmail.com;XYZ@gmail.com.

     

    can i use the same formula using above default selected formula?

     

    Please help!

     

  • developerAJ Profile Picture
    4,763 on at

    @ridhan 

     

    We need to change the formula 

    ForAll(Split(LookUp(equipment_characteristics,equipment_id=ComboBox3.Selected.equipment_id,approval_group),";") ,First( Office365Users.SearchUser({searchTerm:ThisRecord.Value})))

     

    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. If the content was useful in other ways, please consider giving it Thumbs Up.

  • ridhan Profile Picture
    158 on at

    Hi @developerAJ - By using above code it is only selecting first email id and not all email id. Can you please help.. When i check what data is coming after ForAll then it shows all email id in separate row but only showing 1 ID is selected as email.

    ridhan_0-1687343742172.png

     

  • Verified answer
    developerAJ Profile Picture
    4,763 on at

      

    Please check the value thats returning from the lookup column i tried the formula at my end it worked perfectly fine.

    You can try at you end to check.

     

    ForAll(Split("xyz@urorganization.com;abc@urorganization.com",";"),First( Office365Users.SearchUser({searchTerm:ThisRecord.Value})))

     

    just replace sample values with ur organization emails . ur lookup should give the similar value.

     

    Please click Accept as solution and Thumbs Up. 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 Thumbs Up.

    You can connect with me on LinkedIn

     

  • ridhan Profile Picture
    158 on at

    Thank you for your help! 

    It is working now. I have used your code email values and then replaced the emails with lookup. 

    Appreciate your help!

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard