You can use column and view formatting to create buttons that perform pre-defined actions when clicked. This sample provides a quick format that demonstrates the use of each of the possible actions.
These samples are all built for column formatting, but these can be easily adapted to work with view formatting.
Custom row actions only work when placed inside of a
button element. However, you can adjust the button's styles/children to customize the look entirely (you can even wrap your entire format in a button - see the bulletin-board-format for an example).
This action will open the info panel for an item.
This action will open the info panel in edit mode
This action will launch the share dialog for an item
This action will prompt the user with a deletion confirmation dialog and delete the item if they choose yes.
This action will launch a flow for the item as the selected item. This action requires additional configuration through the
actionParams property. The ID is always required, but you can also optionally include
runFlowButtonText properties as well to customize the Flow panel.
Note - the
runFlowButtonTextparameters are not available in SharePoint 2019
To obtain a Flow's ID:
- Click Flow > See your flows in the SharePoint list where the Flow is configured
- Click on the Flow you want to run
- Copy the ID from the end of the URL
- This format can be applied to any column type (its value is ignored)
- If using the
executeFlowaction, the list is expected to have an associated Flow, the ID of this flow needs to be included in the
actionParamsfor the button
Tip - You can apply these formats to a Calculated Column with a formula of
="". This prevents the fields from being part of your edit/new forms.
|1.0||April 18, 2019||Initial release|
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
- Additional samples of the
executeFlowaction can be found here: