Forum Discussion
customRowAction on Document Sets
I have a library of document sets. I would like my end users to be able to see the View Form (not the Properties Pane) for a particular document set with a single click. Normally the view form can be pulled up by digging through the context menu and selecting More and then Properties. This will be too confusing for the end users though. In order to achieve this I set up a custom column and added formatting to that column to add a 'view' button (see video link below). If this was a list item I could use the 'defaultClick' command under 'customRowAction' to trigger the opening of the view form, but for a document set that doesn't work; rather it triggers the opening of the document set.
Can anyone think of a way to open the view form with a single click?
For reference, here is the video showing how to add buttons to custom column using column formatting:
https://www.youtube.com/watch?v=Kjwovfsw0d8&t=288s
automan25 You can open the document set properties on button click using editProps action.
For example:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "View Properties", "customRowAction": { "action": "editProps" } }
Output:
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.
5 Replies
automan25 You can open the document set properties on button click using editProps action.
For example:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "View Properties", "customRowAction": { "action": "editProps" } }
Output:
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.
- automan25Copper ContributorSo, that definitely works to open up the form in 'edit' mode. That may work in the end but I was hoping to find a way to open the form in 'view' mode instead.
automan25 Unfortunately, there is no action available in JSON formatting to open it in view mode.
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.