We have a PowerApps-based ticketing system that's currently in use. We're constantly re-evaluating the code to make it faster, better, more efficient, etc.
Our PowerApps has 3 screens:
1. Intake screen
2. Edit screen
3. Tickets List
The Intake & Edit screens are essentially the same. The biggest difference - the Default property for the Edit screen points to SharePoint for the ticket selected from the Tickets List. One of the fields is Team Assignee. It's a Combobox in PowerApps and a User/Group field in SharePoint (in PowerApps, it's "TeamAssignee_Intake" and "TeamAssignee_Edit")
> The Items property for the fields on both screens is --> Office365Users.SearchUser({searchTerm: Self.SearchText, top: 5})
> The DefaultSelectedItems property on the Edit screen is: Office365Users.SearchUser({searchTerm:LookUp('SharePoint List',ID=VarThisRecord,'Team Assignee'.DisplayName)})
>>> Note - VarThisRecord --> is set to the ID of the ticket from the Tickets List.
Problem - on the Edit screen - if the Team Assignee on SharePoint is blank (as it should be for new tickets), the TeamAssignee_Edit field is showing the very first record in the Office365Users table instead of a blank. When the user clicks an "Update" button on the Edit screen, it's patching back that first record, which is the incorrect choice. I've tried every combination of "If(IsBlank(..." I can think of and can't get this to work. Any help is appreciated to get the DefaultSelectedItems to show blank!