英文:
Formatting a sharepoint list view
问题
I am trying to do a couple of things in a SharePoint list but not getting anywhere. I wondered if you could help.
I am trying to firstly - work it so when someone hits the 'Submit' button (renaming of the 'exitGridView') it not only saves the submission but redirects to another URL? Is that possible with only using the custom JSON editor in SharePoint?
Secondly, it would be great if we could remove the 'Add new item' when in grid view so they can only see what's already there. Again, is this possible in the same way?
So far the JSON looks like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "%",
"operands": [
"@rowIndex",
2
]
},
0
]
},
"sp-css-backgroundColor-BgLightGray30",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "%",
"operands": [
"@rowIndex",
2
]
},
1
]
},
"sp-css-backgroundColor-noFill",
""
]
}
]
},
"commandBarProps": {
"commands": [
{
"key": "exitGridView",
"text": "Submit"
},
{
"key": "editInGridView",
"text": "Edit"
},
{
"key": "new",
"hide": true
},
{
"key": "export",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "share",
"hide": true
},
{
"key": "integrate",
"hide": true
}
]
}
}
Any help would be greatly appreciated.
英文:
I am trying to do a couple of things in a sharepoint list but not getting anywhere. I wondered if you could help.
I am trying to firstly - work it so when someone hits the 'Submit' button (renaming of the 'exitGridView') it not only saves the submission but redirects to another url? Is that possible with only using the custom JSON editor in sharepoint?
Secondly, it would be great if we could remove the 'Add new item' when in grid view so they can only see whats already there. again is this possible in the same way?
so far the JSON looks like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "%",
"operands": [
"@rowIndex",
2
]
},
0
]
},
"sp-css-backgroundColor-BgLightGray30",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
{
"operator": "%",
"operands": [
"@rowIndex",
2
]
},
1
]
},
"sp-css-backgroundColor-noFill",
""
]
}
]
},
"commandBarProps": {
"commands": [
{
"key": "exitGridView",
"text": "Submit"
},
{
"key": "editInGridView",
"text": "Edit"
},
{
"key": "new",
"hide": true
},
{
"key": "export",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "share",
"hide": true
},
{
"key": "integrate",
"hide": true
}
]
}
}
Any help would be greatly appreciated.
答案1
得分: 0
-
退出GridView按钮单击后使用视图格式化重定向到另一个URL是否可能?
- 据我所知,不幸的是这是不可能的。
-
是否可以隐藏命令栏中的“添加新项”?
- 是的,是可以的。您可以隐藏命令栏上的按钮,更改文本或图标等等。您可以在这里找到更多信息。
请不要忘记如果有帮助,请将其标记为答案。
英文:
- Is it possible to redirect to another URL after click on the exitGridView button using view formatting?
- As far I know unfortunately it is not possible
- Is it possible to hide Add new item in Command bar?
- Yes, it is possible. You can hide buttons on Command bar, change text or icon and many more. You will find more information here
Please do not forget mark this as answer if it helps you.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论