使用 SharePoint 的数据查询 Web 部件链接两个列表
我有两个 SharePoint 列表:A 和 A。 B. 列表 A 有一个列,用户可以在其中为 B 中的每个条目添加多个引用(显示为超链接)
A: B:
... | RefB | ... Name | OtherColumns....
----------------- -----------------------
... | B1 | ... B1 |
... | B2,B3 | ... B2 |
... | B1,B3 | ... B3 |
现在我想显示列表 B 中由 AIe 中的(特定)条目引用的所有条目:我设置将筛选器设置为 [条目 2],Web 部件将显示条目 B2 和 B3 中的所有内容。这可能吗?
I have two SharePoint Lists: A & B. List A has a column where the user can add multilple references (displayed as hyperlinks) for each entry to entries in B
A: B:
... | RefB | ... Name | OtherColumns....
----------------- -----------------------
... | B1 | ... B1 |
... | B2,B3 | ... B2 |
... | B1,B3 | ... B3 |
Now I want to display all entries from list B that are referenced by an (specific) entry in A. I.e: I set the filter to [Entry 2] and the Web part displays all the stuff from entries B2 and B3. Is this even possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你遇到的问题正在破坏我正在考虑解决的一些方法,因为 RefB 列是多值的。您可能会喜欢使用 DataView 进行过滤,但当您尝试在逗号上拆分 RefB 并与结果值数组进行比较时,它可能会很快变得混乱。
我认为 RefB 列中只有一个值可以使问题变得更容易。
我想到了三种解决方案。
表 A 中的每一项在 RefB 中只有一个值,并重复表 A 中的其他字段。您必须接受一些数据冗余,并且需要小心数据输入。
解决数据冗余问题的正常关系数据库方法是使用第三个表将表 A 连接到表 B。如果您不熟悉关系数据库技术,有很多关于数据规范化的直接教程在网上。虽然还有一些工作要做,但它可能会带来更干净的解决方案。不过,尝试在 SharePoint 中伪造关系数据库时要小心 - 它不适用于关系数据。使用 SQL 数据库可能会更好。 解决数据冗余问题的正常关系
将所有内容放入一张表中,尽管我认为您已经排除了这一点。
I think the problem you've got which is ruining some of the way's I'm thinking of solving it is that the RefB column is multi-valued. You may have some joy doing filtering with the DataView but it might get messy fast, as you try to split RefB on the comma and compare against the resulting array of values.
I think the problem could be made easier by having only a single value in the RefB column.
Three solutions come to mind.
Have only one value in RefB per item in Table A and repeat the other fields in Table A. You'd have to accept some data redundancy and would need to be careful with data entry.
The normal relational database way of solving your data redundancy problem would be to have a 3rd table joining tabe A to table B. If you're not familiar with relational database techniques, there are lots of straight-forward tutorials on data normalisation on the net. While there's some more work, it may lead to a cleaner solution. Be careful when trying to fake a relational database within SharePoint though - it's not meant for relational data. You may be better off using a SQL database.
Put everything in one table, though I think you've already ruled this one out.