cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

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
Microsoft

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
Microsoft

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.

Highlighted
Resolver I
Resolver I

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 

Highlighted
Microsoft
Microsoft

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.

Highlighted
Resolver I
Resolver I

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?
Highlighted
Microsoft
Microsoft

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.

Highlighted
Resolver I
Resolver I

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
Microsoft

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,607)