【发布时间】:2019-10-24 12:59:42
【问题描述】:
我有以下由 Michael Han 提供的代码,它工作得很好。它将像“2030”这样的数字格式化为“20:30”
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"=substring(toString(@currentField),0,2)",
":",
"=substring(toString(@currentField),2,4)"
]
}
}
我需要将此列用作另一个列表的查找列,因此我粘贴了此代码并在新查找列中将 @currentField 替换为 @currentField.LookupValue如https://github.com/SharePoint/sp-dev-docs/blob/master/docs/declarative-customization/column-formatting.md中所述
结果只是显示“:”。我必须做些什么才能让它发挥作用?
问候, 埃利奥·费尔南德斯
【问题讨论】:
标签: json sharepoint conditional-formatting