按另一列的值格式化列字体颜色
Formatting column font color by another column's value
我有一个包含标题、valColor 和 Pinstyle 列的 SharePoint 列表。我想通过 valColor 中的十六进制代码颜色值为标题列着色。我认为下面会起作用,但事实并非如此。有什么想法吗?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": [$valColor]
}
}
为 [$valColor] 添加“”:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "[$valColor]"
}
}
我有一个包含标题、valColor 和 Pinstyle 列的 SharePoint 列表。我想通过 valColor 中的十六进制代码颜色值为标题列着色。我认为下面会起作用,但事实并非如此。有什么想法吗?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": [$valColor]
}
}
为 [$valColor] 添加“”:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "[$valColor]"
}
}