web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update Button when Cli...
Power Automate
Answered

Update Button when Clicked in SP List Item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a button in SP list item. when user clicks on "Send for Approval" button, it triggers the event to run Flow and send email to others. I want to update the button from " Send for Approval" to "Request Sent" when user clicks the button. That case, we will know which rows the user sent email to others and which rows the user hasn't sent email.

basically, could be an else if condition: If user clicks the button => change to "Request Sent" else 'keep the text the same as Send for Approval'

emmahuynh_0-1614892899661.png

here is the code in JSON for this column. 

{
"elmType": "button",
"txtContent": "Send for Approval",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"3bd8a3d9-311c-46ec-9c09-a2ccc2a62b8a\"}"
},
"style": {
"background-color": "#468259",
"color": "white"
}
}
Thank you
 
Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    hi @Anonymous  I think you need a cannvas app

  • Verified answer
    Expiscornovus Profile Picture
    33,737 Most Valuable Professional on at

    Hi @Anonymous,

     

    In addition to @ChristianAbata his approach you can also amend the current column formatting example and use a operator to set the visibility.

     

    Below is an example of that.

     

    This does require the creation of an additional choice column (Button Request Status) with the values Send for Approval and Request Sent. However, you can hide that column from your view.

     

     

    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
     "elmType": "button",
     "txtContent": "Send for Approval",
     "customRowAction": {
     "action": "executeFlow",
     "actionParams": "{\"id\": \"3bd8a3d9-311c-46ec-9c09-a2ccc2a62b8a\"}"
     },
     "style": {
     "background-color": "#468259",
     "color": "white",
     "visibility": {
     "operator": "?",
     "operands": [
     {
     "operator": "==",
     "operands": [
     "[$ButtonRequestStatus]",
     "Send for Approval"
     ]
     },
     "visible",
     "hidden"
     ]
     }
     }
    }

     

     

    buttonrequeststatus.png

     

    Within the flow setup you can use an update item to set Button Request Status to Request Sent. This will make sure that the button is hidden.

    requestsent.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard