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

Visible by 'Created by' column in Sharepoint

Hi All,

 

I am trying to create a button that gets visible for the users who have created a "ticket" in my Gallery list. Their names are recorded in the 'create by' column in Sharepoint.

 

Is there any formula that can make this able?

 

I hope someone can help me 🙂

 

Thanks in advance!

Ramon

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Visible by 'Created by' column in Sharepoint

Hi @Ramonnooijen ,

Do you want to insert an edit button inside the gallery and only make the button visible if the item's creator is current user?

If so, you need to compare two value: the item's creator's Email and current user's Email.

You could use "Created By.Email" to represent the item's creator's Email.

Use "User().Email" to represent  current user's Email.

I've made a similar test for your reference:
1)click the pen icon on the left top of the gallery to insert button inside the gallery.

39.PNG

 

2)set the button's Visible:

If(ThisItem.'Created By'.Email=User().Email,true,false)

391.PNG

 

Then the edit button's visible will be decided by whether current user is the item's creator.

 

 

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

8 REPLIES 8
Highlighted
Super User
Super User

Re: Visible by 'Created by' column in Sharepoint

On your Gallery items put:
Filter( TestTable, 'Created By' = User().Email)

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution
Highlighted
Helper III
Helper III

Re: Visible by 'Created by' column in Sharepoint

Hi @eka24,

 

If I read that formula correctly it will filter the "tickets" on the Gallerylist, but my idea was that everyone could see all the tickets in the Gallarylist, but only the person who created the "ticket" can open/edit the "ticket".

 

Is there a way to create this?

Highlighted
Super User
Super User

Re: Visible by 'Created by' column in Sharepoint

To edit or not was not part of your question. Now that you want it, select the datacard that has the ticket. Then on its Displaymode in the put: If(emailDatacardValue=User().Emal.Displaymode.Edit,Displaymode.View)

emailDatacardValue is the field that holds user email
Highlighted
Helper III
Helper III

Re: Visible by 'Created by' column in Sharepoint

Correct to Edit isn't part of my question, I mentioned it to try to describe the desired situation.

 

It is more like how to create a button that gets visible for the users who have created (so only they can select it)

 

With your informtion i've tried something like

(visable) If(DataCardValue63=User().FullName,true,false)

Datacardvalue is based on the 'created by"column but this doesn't work.

 

Any ideas?

 

 

Highlighted
Super User
Super User

Re: Visible by 'Created by' column in Sharepoint

What is the name of the datacardvalue that has the Ticket. Is it DataCardValue63 then If(DataCardValue63.Text=User().FullName,true,false) should work.

I also assume you have a field on your form for email?
Highlighted
Helper III
Helper III

Re: Visible by 'Created by' column in Sharepoint

What do you mean by "What is the name of the datacardvalue that has the Ticket"? 

 

In my form I don't have the field which asks for email. But in Sharepoint there is an automatic "create by" column that register the Fullname of the person who created the ticket, so I mentioned to try that.

 

I've added DataCardValue63 in the review page to try to link the datavaluecard in de formula but it looks like it dont work.

Right now i've tried If(ThisItem.'Created By'.value=User().FullName,true,false) but this also gives me an error. "Invalid argument type"

Highlighted
Community Support
Community Support

Re: Visible by 'Created by' column in Sharepoint

Hi @Ramonnooijen ,

Do you want to insert an edit button inside the gallery and only make the button visible if the item's creator is current user?

If so, you need to compare two value: the item's creator's Email and current user's Email.

You could use "Created By.Email" to represent the item's creator's Email.

Use "User().Email" to represent  current user's Email.

I've made a similar test for your reference:
1)click the pen icon on the left top of the gallery to insert button inside the gallery.

39.PNG

 

2)set the button's Visible:

If(ThisItem.'Created By'.Email=User().Email,true,false)

391.PNG

 

Then the edit button's visible will be decided by whether current user is the item's creator.

 

 

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
Helper III
Helper III

Re: Visible by 'Created by' column in Sharepoint

Hi @v-yutliu-msft,

 

This is exactly what I needed!

It didn't really needed to be a Edit button, but I can use the formula for my desired solution.

 

Thanks!

Helpful resources

Announcements
secondImage

New Return to Workplace

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

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,133)