cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

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

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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (4,765)