-1

so am trying to do a form in powerapps for my company and i need to have 2 user comboboxes in it to search for both the employee and then the supervisor. when the user selects the first one using: Office365Users.SearchUser({searchTerm:'Primary User'.SearchText,top:10})

they get the entire list of users, but in the second combobox i have, when they begin typing in there(using the same line as above) it gives them the results from the first one only and not all the people in the company. is there a way to clear the user search history after the selection of the first combobox?

1 Answers1

0

I think your 2nd combobox's datasource is using the same formula as your first, which is why the search isn't being redone. Try changing the 2nd combobox's datasource to Office365Users.SearchUser({searchTerm:'Secondary User'.SearchText,top:10}). And make sure to edit the fields to show on / search for DisplayName.

Alternatively, if your AD has managers assigned, you can replace the 2nd combobox with a lookup after the user selects the name they're searching for: Office365Users.ManagerV2('Primary User'.Selected.Id).displayName (assuming 'Primary User' has multi-select disabled).

DaveS
  • 3,156
  • 1
  • 21
  • 31