cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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

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.

Hi @dinusc,

 

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

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.

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?

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.

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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