Hello community!
At this moment, I am developing an application where I store information in a SharePoint list. I need to create a button which when clicked will update the status of that "Request" to "Cancelled" only if this status is "Pending" as long as it is different from "In Progress", "Done", "Rejected" and "Cancelled".
Is it possible to do this? I want to exclude the delete process request, only update the status to cancelled.
Button to cancel request:

List:

Thanks to all!