cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Hide a record from Gallery in PowerApps

Hello All, 

I hope you are doing great.

I have this query regarding PowerApps and need your assistance. I am Building a survey application where user can login and evaluate analysts, the analyst names are saved in SharePoint. However, I am trying to filter the gallery so the user whose name in the list will not be able to evaluate himself.

is it possible to hide a record from gallery based on user login, for Example my name is in the sharepoint list,  and if I started the application I should be able to evaluate the rest of analysts in the sharepoint list and not seeing my name .

If yes,

1.what should be the appropriate function to use?

2.should I put this function in the login screen or on each gallery where evaluation is 

 

I am looking forward to hearing your feedback and advice 

Thank you 

Aminah 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Hide a record from Gallery in PowerApps

Hi @atopa ,

Could you tell me the field's data type that contains analyst names in your sharepoint list?
If it is a person field, does it allow multiple value?

I  assume that field is a person field which allows multiple value.

Ps. you do not need to filter every time in your gallery, you could create a collection with data that not includes analyst names of yours at the beginning, then display this collection in your gallery. In this solution, you just need to filter one time when you create the collection.

Here's my solution for your reference:

1)set the app's OnStart:

ClearCollect(collection1,Filter(listname,Not(User().Email in analyst_name_field.Email)))

//pleas replace with your listname and fieldname

 2)set the gallery's Items:

collection1

Then the gallery that sets to this collection will not display items that analyst name is yours.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

4 REPLIES 4
Highlighted
Community Champion
Community Champion

Re: Hide a record from Gallery in PowerApps

Hi @atopa ,

There are two built-in functions in Power Apps - User().Email and User().FullName.

Neither are delegable filters so if this is an issue, you can set a Variable at App OnStart

Set(vUserName, User().FullName)

AND/OR

Set(vUserMail, User().Email)

Using a filter (note also Not() is not delegable), so you may have to do a collection.

Filter(
  YourList,
  ListNameField <> vUserName
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Community Support
Community Support

Re: Hide a record from Gallery in PowerApps

Hi @atopa ,

Could you tell me the field's data type that contains analyst names in your sharepoint list?
If it is a person field, does it allow multiple value?

I  assume that field is a person field which allows multiple value.

Ps. you do not need to filter every time in your gallery, you could create a collection with data that not includes analyst names of yours at the beginning, then display this collection in your gallery. In this solution, you just need to filter one time when you create the collection.

Here's my solution for your reference:

1)set the app's OnStart:

ClearCollect(collection1,Filter(listname,Not(User().Email in analyst_name_field.Email)))

//pleas replace with your listname and fieldname

 2)set the gallery's Items:

collection1

Then the gallery that sets to this collection will not display items that analyst name is yours.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Highlighted
Frequent Visitor

Re: Hide a record from Gallery in PowerApps

Thank you for the support

I have tried the given solution unfortunately it  didn't help me

I have 2 sharepoints

1. SP for list of analyst contains the following column  ( user full name, user alias and user roles) all values in single text

2. SP for Criteria contains ( communication skills score, problem solving score and support scores, evaluator and evaluated analyst)

Evaluated analyst and evaluator are single text while the scores are multiple choice

I've managed to patch the data to  Criteria SP, however the problem is when the analyst in the list start the application as he will be able to see his name in the list

Attached this is screenshot of survey application

Highlighted
Frequent Visitor

Re: Hide a record from Gallery in PowerApps

Thank you Warren for the fast reply.

I have followed the given solution Unfortunately my name still showing in the list when I start the apps

I have 2 sharepoints

1. SP for list of analyst contains the following column  ( user full name, user alias and user roles) all values in single text

2. SP for Criteria contains ( communication skills score, problem solving score and support scores, evaluator and evaluated analyst)

Evaluated analyst and evaluator are single text while the scores are multiple choice

I've managed to patch the data to  Criteria SP, however the problem is when the analyst in the list start the application as he will be able to see his name in the list

Attached this is screenshot of survey application

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,066)