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

How to filter combo box items based on user login

Hi All,

I have customer has a data source.

I need to filter combo-box items based on user login, How can achieve this. Can anyone help me to fix this issue.

 

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to filter combo box items based on user login

Hi @jeniviya ,

Could you please share a bit more about the data structure of your "Access Roles" Entity?

Could you please show more details about the formula you typed within the Items property of the Customer Name ComboBox?

 

I assume there are two Text type columns in your "Access Roles" Entity to store the Customer name and corresponding user. Based on the needs that you mentioned, I think the Filter function could achieve your needs.

 

Please set the Items property of the Customer ComboBox to following:

Distinct(
      Filter(
            'Access Roles',
            UserName = User().FullName
      ),
      CustomerName
)

Note: The UserName and CustomerName are both Text type columns in your "Access Roles" Entity. The UserName is used to store the User name, e.g. 'Smith Liu'. The CustomerName is used to store the Customer name, e.g. citi bank, citi finance.

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
Highlighted
Super User
Super User

Re: How to filter combo box items based on user login

@jeniviya 

You have not provided any details about how the ComboBox should be filtered.  How does the the User determine which Customers should appear?

Community Champion
Community Champion

Re: How to filter combo box items based on user login

Try:

Filter(Customer,EmailColumn=User().Email)

or

Filter(Customer,NameColumn=User().FullName)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Helper I
Helper I

Re: How to filter combo box items based on user login

If i'm running power app then i'm the user for particular app.

Whenever i'll run the app based on my user name or email , customer name should be filtered.

Highlighted
Super User
Super User

Re: How to filter combo box items based on user login

@jeniviya 

How would I know which customer you want to have filtered for each user?  Do you want me to guess what you want to do, lol?  You need to provide more details than just a single sentence...

Highlighted
Helper I
Helper I

Re: How to filter combo box items based on user login

I have customer name as citi bank, citi finance, whenever i run the app i should get these 2 customers name in combo box

Highlighted
Super User
Super User

Re: How to filter combo box items based on user login

@jeniviya 
This is still not enough information.  How would PowerApps know these 2 customers are what YOU should see as opposed to what OTHERS should see?  Your question implies that each User should have different customers available in the dropdown.

If you cannot take the time to be detailed in your explanation then I cannot help you here.

Highlighted
Helper I
Helper I

Re: How to filter combo box items based on user login

I have user A, for user A i want customer name as citi bank

I have user B, For user B i want customer name as citi bank, citi finance

Highlighted
Super User
Super User

Re: How to filter combo box items based on user login

@jeniviya 
OK.  Where is the information stored about which Customer belongs to which user?

Highlighted
Helper I
Helper I

Re: How to filter combo box items based on user login

There is one more entity as "Access Roles", In access roles it has information about which customer belongs to which user

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

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 (607)