SharePoint Online文档列表项添加按钮呼出属性面板的实现问题
你需要的功能可以通过 SharePoint 列格式化内置的 customRowAction 能力直接实现,无需配置外部跳转链接,以下是可用的JSON配置:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "button", "txtContent": "查看属性", "customRowAction": { "action": "openProperties" }, "style": { "border": "none", "background-color": "#0078d4", "color": "white", "padding": "4px 12px", "border-radius": "4px", "cursor": "pointer" } }
配置说明
- 该配置直接调用 SharePoint 预置的打开属性面板动作,点击按钮后会自动选中当前条目并呼出原生侧边属性面板,和默认UI的滑动展开效果完全一致
- 你可以自行调整
style节点内的参数修改按钮样式,若需要按钮显示当前列的原始值,将txtContent的取值改为@currentField即可
你之前尝试的Power Apps链接方案是用于跳转自定义表单的场景,和调用原生属性面板的需求不匹配,因此会出现参数报错、交互不符合预期的问题。
内容的提问来源于stack exchange,提问作者Chris ten Den
相关产品推荐
相关产品推荐

