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 Display Field...
Power Apps
Answered

Combobox Display Fields Lookup if user email is in a sharepoint column

(0) ShareShare
ReportReport
Posted on by 588

Hi all, struggling to get my head around this one so hope someone might have a solution for me. 

 

I've put a combobox in my app, the data source being my SharePoint List. The DisplayFields is currently set to ["Title"] which lists all the reference numbers. Users will select a record and it will make a ViewForm visible of that data. 

 

I want to restrict access so that users can only select records in which they are named in one of 4 People Picker columns in that record (PI, RDM, BP, SubmittedBy), so I figure I need to filter the list so it only shows the relevant records, but I'm struggling to write any sort of LookUp/Filter on the Items or DisplayFields of the combobox which works. I have the current user (lowercase) email saved as varUserEmail.

 

Any suggestions? and many thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    cdwhite Profile Picture
    1,067 Most Valuable Professional on at

    Hi @misc ,

    You can filter a gallery/table/collection/combo box items to only show records where the logged on users email address appears in one of the Person or Group columns in your SharePoint list, like so:

     

    Filter(
     NameOfSharePointList,
     Person1Column.Email = varUserEmail || 
     Person2Column.Email = varUserEmail ||
     Person3Column.Email = varUserEmail ||
     Person4Column.Email = varUserEmail
    )

     

    ------------------------------------------------------------------------------------------------------------------------------
    If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.

    If my response was a good one, please give it a Thumbs Up!

    Visit my blog: https://platformsofpower.net

  • misc Profile Picture
    588 on at

    Unfortunately that doesn't seem to be working. I tried with a simplified version to start, just 

    misc_0-1709301205409.png

    but it is still showing me the whole list in the combobox

    Screenshot 2024-03-01 135412.jpg

    The PI column is currently empty for every record, so it shouldn't be returning anything.

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @misc,

    I strongly suggest you delete your current ComboBox for DisplayFields of Title and add a new one because I am not sure if you have other settings for this ComboBox, which may affect the formula we set for Items property.

     

    Furthermore, please show me the error message of the red wave  from your formula?

     

  • misc Profile Picture
    588 on at

    Hi Qi,

     

    I do not get a red error line, it is as the screenshot above. The only error it sends is a delegation warning because I used Lower().

     

    This combobox appears to be behaving differently than ones I've used in the past (I've never linked a data source directly to a combobox before, like you do a Form, and the displayfields property seems new. Has there been an update introduced which has changed how this input interacts perhaps?

     

    In any case, I tried what you suggested and removing/replacing the combobox with no luck, but when I tried replacing with a Dropdown instead your formula did work so I'll stick with the dropdown instead.

     

    Thanks for your help.

  • misc Profile Picture
    588 on at

    Actually coming back to this again as the dropdown perhaps wasn't the solution I was looking for. 

    If I use a dropdown instead of a combobox the Items property of my Form then breaks and is unable to pull through the correct record, so I'm leaning back towards using the Combobox and figuring out another solution for the filtered list unfortunately. Unless you know how to set the Item property of a form based on a DropDown rather than a combobox?

     

    Thanks

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard