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

Visibility based on user

Hi,

 

I would like to add an icon to a gallery connected to a document library which is only visible if the app user has added an item to a SharePoint list.

 

The gallery is a document library which shows the user several folders.  In the next gallery, they can see the files within those folders.  

 

I have been working on an annotation feature so if the user wants to make a note about a file, they can add it on the app and it will save in a SharePoint list which records the users email and the file name.

 

Is there a way of making the icon in the gallery visible only if a user has added an item to the SharePoint list?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Suchitra1996
Resolver II
Resolver II

@ell1990 

Hi,

 

You can set below formula on App "OnStart" property

Set(UserName,User().FullName);

 

and then set the "Visible" property of the icon to the below:

 

If(ThisItem.'Created By'.DisplayName=UserName,true,false)

 


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Suchitra1996
Resolver II
Resolver II

@ell1990 

Hi,

 

You can set below formula on App "OnStart" property

Set(UserName,User().FullName);

 

and then set the "Visible" property of the icon to the below:

 

If(ThisItem.'Created By'.DisplayName=UserName,true,false)

 


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

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