web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combobox DefaultSelect...
Power Apps
Answered

Combobox DefaultSelectedItems - Office365Users - Show Blank if SharePoint is Blank

(0) ShareShare
ReportReport
Posted on by 95

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!
Categories:
I have the same question (0)
  • Verified answer
    WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    I tried this and it worked OK:

     

    If(IsBlank(Blank()),[],Office365Users.SearchUserV2({searchTerm:Blank()}).value)

     

    Replace Blank() with your variable name and LookUp formula, and adjust the formula as you still seem to be using the old version of the SearchUser function.

  • Chris110 Profile Picture
    95 on at

    BINGO! Thanks very much!!!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard