cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daroot
Level 8

Drop-down List Lookup

Hi All,

I plan to filter a drop-down list based on current users.

The following table, get from another system(attached).

What I plan to is, when Jhon access the app, in the drop-down box only showing the list assigned to him, and the items assigned to Jenny will not showing on the drop-down list. Is it possible, and how to achieved this?

Thanks,



1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: Drop-down List Lookup

The Filter function requires table or source name. Please see this: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

In your case, your DropDown (or ComboBox) Items property should be set to something like:

Filter(YourSourceName, Lower(Table1.AssignedTo) = Lower(User().Email

 

View solution in original post

7 REPLIES 7
Highlighted
Microsoft Employee

Re: Drop-down List Lookup

Hello @daroot,

You should be able to achieve this by using the following formula to populate the DropDown control:

Filter(YourSourceName, AssignedTo= User().Email)

That assumes that the email of the logged in user is the same as the one listed in your source.

daroot
Level 8

Re: Drop-down List Lookup

Hi @dinusc,

 

I tried that suggestion but the dropdown list being empty. 😞 I am sure on the list current email have 3 assignment 

Microsoft Employee

Re: Drop-down List Lookup

The possible reasons could be that email is different or formatted differently. You can check this by adding a temporary label control to your application and binding its "Text" property to User().Email and DropDown (or better yet ComboBox) control's "Items" property to your source directly (turn off filtering). This will allow you to compare the email addresses and understand the reason the filter does not work properly. Please note "Trim" and "Lower" functions that could be used for removing extra spacing and for performing a lower case comparison.

daroot
Level 8

Re: Drop-down List Lookup

Will try it as your suggestion. Currently in the Assigned to field has the email like a users login, and what do you mean the different format. On the SPList assignedto field as a text type, it could be a problem?
Microsoft Employee

Re: Drop-down List Lookup

I meant the way the email is in the AssignedTo field. For example, the AssignedTo may contain the email as MyEmail@MyDomain.com while User().Email may return myemail@mydomain.com in which case Lower(YourSourceName.AssignedTo) = Lower(User().Email) will address the issue. I've seen also cases when the email fields contain extra spaces in which case the "Trim" function should help.

daroot
Level 8

Re: Drop-down List Lookup

Hi @dinusc,

 

I tried to put the Lower but got the error on the "=" here the functions :

Filter(Lower(Table1.AssignedTo) = Lower(User().Email)

 So, at the end is, I want in the dropdown will print the TicketTitle in the dropdown box.

IMG_20181031_201910.jpg

Microsoft Employee

Re: Drop-down List Lookup

The Filter function requires table or source name. Please see this: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

In your case, your DropDown (or ComboBox) Items property should be set to something like:

Filter(YourSourceName, Lower(Table1.AssignedTo) = Lower(User().Email

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,779)