cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Edit button, Add Botton and Save Button

 Hi! I  have a Power App form that is connected to a SharePoint list, what I need to do is to make some kind of condition so that the 'Edit button' allows to edit the form only if the person wanting to edit is the same one registered in the SharePoint fields named: "SME" or "Responsible" or "Asigned To", same case for the Save Button.

And for the "Add Button" I want to deploy a blank form so that the user can entry the information and when clicking the 'Save button' it gets stored in the SharePoint list as well.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Edit button, Add Botton and Save Button

Hi @AllisonCruz ,

 

Could you please share a bit more about your scenario and the layouts?

Do you want to limit the users to edit on the Gallery screen and save on the detail form screen?

Or users could turn to detail screen without limitation but only users’ names meet the three field’s content could see or click the Edit Button?

And what are the field TYPE of the three column you mentioned in the post, Person or Text?

 

I assume they are Person type fields.

First of all, on the Gallery screen, set screen’s OnVisible to

 

Set(varUser, User().FullName)

 

Then if the Edit Button is on the Gallery screen, like the right arrow of the Item of below screenshot, set the Edit Button’s Visible to

 

If(varUser = ThisItem.SME.DisplayName || varUser= ThisItem.Responsible.DisplayName || varUser= ThisItem. ‘Asigned To’.DisplayName)

 

25.jpg

On the Edit form screen, set Save Button’s DisplayMode to:

 

If(varUser= DataCardValue1.Selected.DisplayName || varUser= DataCardValue2.Selected. DisplayName || varUser= DataCardValue3.Selected. DisplayName, DisplayMode.Edit, DisplayMode.View)

 

26.jpg

If you want to limit users editing after they enter the details screen, so the Edit Button is on the Details Screen, then also set Edit Button’s DisplayMode to the above formula.

 

 

 

Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution  to help the other members find it more.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Edit button, Add Botton and Save Button

Assuming the Textbox on your form for the field responsible is Textbox2, consider this formula on displaymode of the button;

If(User().FullName=Textbox2.Text, DisplayMode.Edit,DisplayMode.View)

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

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
Microsoft
Microsoft

Re: Edit button, Add Botton and Save Button

Hi @AllisonCruz ,

 

Could you please share a bit more about your scenario and the layouts?

Do you want to limit the users to edit on the Gallery screen and save on the detail form screen?

Or users could turn to detail screen without limitation but only users’ names meet the three field’s content could see or click the Edit Button?

And what are the field TYPE of the three column you mentioned in the post, Person or Text?

 

I assume they are Person type fields.

First of all, on the Gallery screen, set screen’s OnVisible to

 

Set(varUser, User().FullName)

 

Then if the Edit Button is on the Gallery screen, like the right arrow of the Item of below screenshot, set the Edit Button’s Visible to

 

If(varUser = ThisItem.SME.DisplayName || varUser= ThisItem.Responsible.DisplayName || varUser= ThisItem. ‘Asigned To’.DisplayName)

 

25.jpg

On the Edit form screen, set Save Button’s DisplayMode to:

 

If(varUser= DataCardValue1.Selected.DisplayName || varUser= DataCardValue2.Selected. DisplayName || varUser= DataCardValue3.Selected. DisplayName, DisplayMode.Edit, DisplayMode.View)

 

26.jpg

If you want to limit users editing after they enter the details screen, so the Edit Button is on the Details Screen, then also set Edit Button’s DisplayMode to the above formula.

 

 

 

Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution  to help the other members find it more.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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,595)