Execute Flow while viewing a list item

Copper Contributor

I've configured the layout for the list item header to use the JSON below: 

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Generate PDF",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"************************************\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"background-color": "#008082",
"border":"1px solid #008082",
"color":"white",
"cursor": "pointer",
"margin-top":"15px"
}
}

 

SharePointList_ViewItem_JSONHeader.png

 

However, when I click on an item to view it then click on the "Generate PDF" button it will not run the flow:

SharePointList_ViewItem.png

 

I've also tried to go into the list's settings and applied the same JSON to a "Generate PDF" single line of text column that I created. The flow will run if I click on the "Generate PDF" button while in the All Items view, but I'm looking to have the flow run while viewing a single item in the list like in the screenshot above. Is this possible? If so, what am I doing wrong?

 

I know it's possible to accomplish this with a Power App, however, Power Apps does not support the table formatting added to rich-text enabled columns. 

1 Reply

@eahbxecrfash3q Unfortunately, customRowAction (executeFlow) is not supported in list form JSON formatting (header/footer layouts).

 

Check these links for more information:

  1. Add Button to SharePoint Form JSON 
  2. Start Power Automate Flow from Button in Footer 

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.