为什么我在 Sharepoint 自定义列表表单中看不到“作者”、“创建者”、“编辑者”和“修改者”字段?
因此,我需要根据项目的创建者隐藏 Sharepoint 自定义列表中的字段。 我已经完成了概述的步骤 here 它非常适合根据权限级别隐藏字段。 但是,如果用户具有一定的权限级别或者是在列表中创建项目的用户,我需要能够显示该字段。
尽管这些字段列在 DataViewSource 中,但如果我查看返回以呈现的 XML,它会包含除上述四个字段之外的所有字段。 甚至 Sharepoint Designer 也认为它应该可以工作,因为它基于 GUI 中的“创建者等于 [当前用户]”创建了以下条件渲染:
@Author = $UserID
但 @Author 字段不存在。 我想我可以将列表设置为仅显示当前用户创建的项目,但在这种情况下,这对于用户查看其他人的项目会很有帮助。 另一个“最好有”是,一旦创建日期之间经过了一定时间,就不会显示该字段,这又意味着我需要能够与“已创建”字段进行比较。
这是设计使然还是我错过了什么?
So, I have a requirement to hide a field in a Sharepoint custom list based on the creator of the item. I've gone through the steps outlined here and it works great for hiding the field based on permission level. However, I need to be able to show the field if the user has a certain permission level OR is the one who created the item in the list.
Although the fields are listed in the DataViewSource, if I look at the XML that is being returned to render, it includes every field except the four above. Even Sharepoint Designer thinks it should work as it creates the following conditional rendering based on the "Created By Equals [Current User]" in the GUI:
@Author = $UserID
And yet the @Author field doesn't exist. I guess I could set the list to show only the items that the current user has created, but it would be helpful in this case for users to see others' items. Another "nice to have" would be not showing the field once a certain time has passed between the creation date, which again, would mean I'd need to be able to compare with the "Created" field.
Is this by design or am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然我不确定这些字段被隐藏的原因,或者这个解决方案是否会导致其他问题。 但是,如果将 DataSourceMode 从“ListItem”更改为“List”(如下例所示),则字段 @Created 现在可用。
SharePoint 的奇迹及其精美的设计工具。
Although I am not certain of the reason why those fields are hidden, or if this solution causes other issues. However, if you change the DataSourceMode from "ListItem" to "List", as shown the example below, the field @Created is now available.
The wonder of SharePoint and its beautiful design tool.