Forum Discussion
roktoro
Mar 16, 2024Copper Contributor
How to add button in footerFormatter of SharePoint List layout with JSON?
As per documentation footerFormatter is a JSON object that defines the format for group and list footer. The schema of this JSON object is identical to the schema of a column format (and that of rowFormatter). It is valid in 'List' and 'Compact List' layouts.
I have tried to customize my List footer with a button which triggers flow when clicked. It gets rendered fine, but doesn't execute any action - have tried even different action values for customRowAction. Any ideas why button doesn't work in footerFormatter, any possible workarounds?
My JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"hideFooter": false,
"footerFormatter": {
"elmType": "button",
"txtContent": "Start My Flow",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"flow ID\"}"
}
}
}
roktoro I think customRowAction is NOT supported while using footerFormatter in SharePoint JSON formatting as it requires the context of individual list item/row and footer is rendered only once at the bottom of list page.
It is not supported in list form JSON formatting as well.
Related read:
- Execute Flow while viewing a list item
- Add Button to SharePoint Form JSON
- 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.
roktoro I think customRowAction is NOT supported while using footerFormatter in SharePoint JSON formatting as it requires the context of individual list item/row and footer is rendered only once at the bottom of list page.
It is not supported in list form JSON formatting as well.
Related read:
- Execute Flow while viewing a list item
- Add Button to SharePoint Form JSON
- 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.
- roktoroCopper ContributorThat's a pity cause documentation states that schema of footerFormatter is identical to the schema of a column format... I would have saved lots of time, if there would have been a clear note in https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-group-formatting or https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/formatting-syntax-reference ...