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.
