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

Conditional Visibility based on User Selected Item

Hi All,

I have a gallery of items that OnSelect leads to a detailed information screen that allows users to accept the item. Upon acceptance, the status of the item will change from 'Undelivered' to 'In Progress'. When this happens, the gallery of items visibility will be hidden from the user. The code is shown below. While my intent is to hide from the current user. The outcome is that it hides for all users! How do I isolate the visibility of the gallery items to each user's actions?

Alois_0-1603813865848.png
Thanks in advance!

Alois

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Resolver I
Resolver I

Hi @Alois ,

 

i guess you can do something like this,

in the visible property of item

ThisItem.status.value = "In Progress" && ThisItem.'Modified By'.Email = User().Email

View solution in original post

Community Support
Community Support

Hi @Alois ,

Do you want to hide some items only for current user?

Could you tell me the details of the hiding rule?

Do you have a column with email value and if someone accept activity, this field will update with the person who accept the activity?

Or do you want to hide the accepted activities temporarily when been accepted?

Firstly, I suggest you use Filter function to filter items based on different situations, not set gallery's Visible which will hide the whole gallery.

 

1)In first situation, you could set gallery's Items like this:

 

Filter(tablename,Not(status.value = "In Progress" ,'Modified By'.Email = User().Email))

 

 

2)In second situation, you could set like this:

set the accept button's OnSelect:

 

Collect(accepteditems,ThisItem.ID)

 

set the gallery's Items:

 

Filter(tablename,Not(ID in accepteditems.ID))

 

 

 

 

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

2 REPLIES 2
Resolver I
Resolver I

Hi @Alois ,

 

i guess you can do something like this,

in the visible property of item

ThisItem.status.value = "In Progress" && ThisItem.'Modified By'.Email = User().Email

View solution in original post

Community Support
Community Support

Hi @Alois ,

Do you want to hide some items only for current user?

Could you tell me the details of the hiding rule?

Do you have a column with email value and if someone accept activity, this field will update with the person who accept the activity?

Or do you want to hide the accepted activities temporarily when been accepted?

Firstly, I suggest you use Filter function to filter items based on different situations, not set gallery's Visible which will hide the whole gallery.

 

1)In first situation, you could set gallery's Items like this:

 

Filter(tablename,Not(status.value = "In Progress" ,'Modified By'.Email = User().Email))

 

 

2)In second situation, you could set like this:

set the accept button's OnSelect:

 

Collect(accepteditems,ThisItem.ID)

 

set the gallery's Items:

 

Filter(tablename,Not(ID in accepteditems.ID))

 

 

 

 

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

Helpful resources

Announcements
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,585)