我想创建一个仅在“Zapůjčeno”列为空时才会显示的按钮。
{
"elmType": "button",
"txtContent": "Odeslat Žádost",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"7347b7be-696f-46c8-bae8-78c230a354b3\"}"
},
"style": {
"background-color": "#03A9F4",
"color": "white",
"visibility": {
"operator": "?",
"operands": [
{
"operator": "!=",
"operands": [
"[$ID]",
"1"
]
},
"hidden",
"visible"
]
}
}
}
如果我使用默认列“ ID”来尝试它,则可以,但是如果我想使用我的列“ Zapitjčeno”,它将不起作用。
感谢你的建议,我是SharePoint的新手。
Zapůjčeno列内部名称与显示名称相同吗?你可以在列表/库设置中看到该列的内部名称,然后单击列名称。该列的内部名称将出现在URL中。
我认为你可以使用以下方式:
{
"elmType": "button",
"txtContent": "= if([$Zapůjčeno_Internal_Name]=='','Odeslat Žádost', '')",
"customRowAction": {
"action": "executeFlow",
"actionParams": "='{\"id\": \"' + if([$Zapůjčeno_Internal_Name]=='','7347b7be-696f-46c8-bae8-78c230a354b3','') + '\"}'"
},
"style": {
"background-color": "#03A9F4",
"color": "white",
"visibility": {
"operator": "?",
"operands": [
{
"operator": "!=",
"operands": [
"[$ID]",
"1"
]
},
"hidden",
"visible"
]
}
}
}
谢谢你的建议。有用!