cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Super User III
Super User III

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
Frequent Visitor

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

Highlighted
Super User III
Super User III

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
Highlighted
Super User III
Super User III

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
Frequent Visitor

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

Highlighted
Super User III
Super User III

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

Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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 (7,441)