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 / O365 Search Users Comb...
Power Apps
Answered

O365 Search Users Combo Box, Default value to data source, blank if no value in data source

(0) ShareShare
ReportReport
Posted on by 141

So, I am building an app to employee evaluations.  The employee receives and email to select who should rate them, and then who should review them (two person fields in SP no multiple selections).  After a deadline, then a manager will review the selections made,  and if the employee did not make selections the manager will select one for them.  I am building the interface for the manager to review and/or select the two people (rater and reviewer).  I have combo box with the Items property set to 

 

Office365Users.SearchUser({searchTerm:cmbReviewer.SearchText,top:10})

 

the rater uses cmbRater on it's combo box.  When the manager selects the employee to review/make selections, I store the employee record in a variable (varEmpInfo), and on each combo box respectively put the DefaultSelectedItems property to 

 

 

Office365Users.SearchUser({searchTerm:varEmpInfo.Reviewer.Email})

 

The problem I am having is when there is nobody selected the combo box is defaulting to the first account record in my tenant.  I want it to just be blank and say "Find Items" like as if I didn't have a default set.  I was originally using 

 

Choices(EmployeeInfo.Rater)

 

and the default set to varEmpInfo.Rater, but when I use this method I don't get all the properties available to display on the screen so when the manager assigns the Rater and Reviewer they can see their job title(available), Division(not available, and UOA(not available).  When I use O365 Users, I get all the properties I need.  I have tired using an IF statement on the default selected properties, but I always goes back to the first record in my tenant when I don't have a record in my variable.

 

If(varEmpInfo.Rater.Email<>"",
Office365Users.SearchUser({searchTerm:varEmpInfo.Rater.Email}),[])

 

I have tried like above, [ ], as well as { }, and Office365Users.SearchUser({searchTerm:""}).  While all those options give me no error in my function formula, they all do not give me the desired result and still have the default selected item the first record in my tenant.

 

I have set a record with the Rater blank in SP and the Reviewer with a person selected to show how it is displaying.

ScottRMeredith_0-1650839863208.png

 

Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @ScottRMeredith ,

     

    Please try and use IsBlank() in the If statement:

     

     

    If(IsBlank(varEmpInfo.Rater.Email),
     Blank()
     Office365Users.SearchUser({searchTerm:varEmpInfo.Rater.Email})
    )

     

     

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • ScottRMeredith Profile Picture
    141 on at

    @v-jefferni 

     

    No luck...If I don't find a solution soon, I have a parallel project that we are taking our employee management system and going to be duplicating their main identifiers and work locations into a SharePoint list, so I will be able to reference that instead of O365 Users.  Thanks for the suggestion though.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @ScottRMeredith ,

     

    Strange... From my end it works fine:

    vjefferni_0-1651111576770.png

     

    Would you please double check the formula?

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • ScottRMeredith Profile Picture
    141 on at

    @v-jefferni  sorry I must have been in a fog the day of your original reply.  I had used

    If(varEmpInfo.Rater.Email<>"",
    Office365Users.SearchUser({searchTerm:varEmpInfo.Rater.Email}),Blank())

    instead of the code you provided.  This morning when I actually plugged in the code you provided, it worked like a charm.  Thank you.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard