cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marcgiag
Level: Powered On

Need to create a button that will add the word "CANCEL" to an Item column

I have created a power App.

 

  • One Screen Collect the Data (I don't need help with this screen)
  • Second screen only shows the STATUS of what was previously entered. 
    • All in this screen I have a gallery to show all my open request.
    • When my request is selected it displays the details of the selected request to the right.

 

I added a button called "Cancel this Request"  that I can't figure out how to make work. 

When User selects the item and it is displayed.... if the button "Cancel this Request" is selected i would like to add the word "CANCEL" to a cancelled column in SharePoint.  

 

Any help would be great

 

See example screen

3 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Need to create a button that will add the word "CANCEL" to an Item column

@marcgiag 

Put this code in the OnSelect property of a button

 

Patch(
    your_sharepoint_list,
    Gallery1.Selected.ID,
    {Cancelled: "Cancel"}
)

 

 

AWESOME screenshot by the way!!!

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

Highlighted
marcgiag
Level: Powered On

Re: Need to create a button that will add the word "CANCEL" to an Item column

@mdevaney ,that didn't work it says the function Patch has invalid arguments

 

Here is what I typed

 

Patch('Job Requisition Form',Gallery2.Selected.ID,{Cancelled: "Cancel"})

 

See Screenshot (thanks for the callout on the screenshot)

View solution in original post

Super User
Super User

Re: Need to create a button that will add the word "CANCEL" to an Item column

@marcgiag 

I made a small error with the 2nd argument for PATCH.  See my correction below.

Patch('Job Requisition Form', Gallery2.Selected, {Cancelled: "Cancel"})

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Need to create a button that will add the word "CANCEL" to an Item column

@marcgiag 

Put this code in the OnSelect property of a button

 

Patch(
    your_sharepoint_list,
    Gallery1.Selected.ID,
    {Cancelled: "Cancel"}
)

 

 

AWESOME screenshot by the way!!!

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

Highlighted
marcgiag
Level: Powered On

Re: Need to create a button that will add the word "CANCEL" to an Item column

@mdevaney ,that didn't work it says the function Patch has invalid arguments

 

Here is what I typed

 

Patch('Job Requisition Form',Gallery2.Selected.ID,{Cancelled: "Cancel"})

 

See Screenshot (thanks for the callout on the screenshot)

View solution in original post

Super User
Super User

Re: Need to create a button that will add the word "CANCEL" to an Item column

@marcgiag 

I made a small error with the 2nd argument for PATCH.  See my correction below.

Patch('Job Requisition Form', Gallery2.Selected, {Cancelled: "Cancel"})

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

marcgiag
Level: Powered On

Re: Need to create a button that will add the word "CANCEL" to an Item column

@mdevaney I don't know how I messed up selecting as a solution but this was GREAT.

 

Now I have a view of my completed requests that shows both truly completed and cancelled with the word CANCEL on it 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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