You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在SharePoint Online表单头部JSON格式化中调用列表标题与描述?

SharePoint Online表单头部JSON格式化调用列表标题与描述

核心参数说明

在表单头部的JSON格式化中,可通过以下内置参数直接调用列表本身的标题和描述:

  • 列表标题:@root.list.title
  • 列表描述:@root.list.description

示例JSON代码

以下是完整的表单头部格式化示例,直接展示列表标题和描述:

{
  "elmType": "div",
  "style": {
    "padding": "16px",
    "background-color": "#f3f2f1",
    "border-bottom": "1px solid #e1dfdd"
  },
  "children": [
    {
      "elmType": "h1",
      "txtContent": "@root.list.title",
      "style": {
        "font-size": "20px",
        "font-weight": "600",
        "margin-bottom": "8px",
        "color": "#323130"
      }
    },
    {
      "elmType": "p",
      "txtContent": "@root.list.description",
      "style": {
        "font-size": "14px",
        "color": "#605e5c",
        "margin": "0"
      }
    }
  ]
}

使用步骤

  • 打开目标SharePoint列表的表单(新建/编辑/显示表单均可)
  • 点击表单右上角的格式化当前视图(或在表单设置里找到格式化表单选项)
  • 选择头部区域,粘贴上述JSON代码后保存即可生效

注意事项

  • 需确保列表已设置描述(在列表设置的列表名称、描述和导航中配置)
  • 这些参数仅适用于表单的头部/脚部区域的JSON格式化,列表视图格式化无法直接使用

内容的提问来源于stack exchange,提问作者Emerson Bruce

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 12:50:46