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

Notifications

Announcements

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

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,951 Most Valuable Professional on at

    hi @Anonymous  I think you need a cannvas app

  • Verified answer
    Expiscornovus Profile Picture
    33,195 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard