过滤列表视图,如果当前用户部门包含 [英] filter List view if the current user department contains

查看:60
本文介绍了过滤列表视图,如果当前用户部门包含的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个列名为Department的列表,我想根据当前的用户数量动态过滤列表视图,因此能够通过添加当前用户过滤器  webpart。


但我想过滤它,如通配符  


如果当前用户部门是市场营销且部门字段中的值是战略性的规划&营销 


我该如何实现这一目标?







sal

解决方案


我们可以使用SharePoint Designer添加表单参数,并通过带有"contains"比较的参数过滤"Department"列表字段。在当前用户过滤器
Web部件中,从列表中获取此新参数,然后执行过滤。


以下是步骤:


1。在SharePoint Designer中打开页面。


2。使用高级模式编辑页面。找到列表Web部件,将光标放在"< WebPartPages:XsltListViewWebPart ..."之间。和< / WebPartPages:XsltListViewWebPart>。


3。打开列表视图工具,然后单击"参数"。





如果找不到列表视图工具,请按照
中的步骤操作


最好的问候,


Linda  Zhang


Hi,

I have a list with column name Department and i want to filter list view dynamically based on the current user deparment , so was able to do it by adding the Current User Filter  webpart.

but i want to filter it like wildcard  

if Current user Department is Marketing and the value in the Department field is Strategic Planning & Marketing 

how can i achieve this ?



sal

解决方案

Hi,

We can use SharePoint Designer to add a form parameter and filter "Department" list field by the parameter with "contains" comparison. In the Current User Filter web part, get this new parameter from the list and then do a filter.

Here are the steps:

1. Open the page in SharePoint Designer.

2. Edit the page with Advanced Mode. Find the list web part, place the cursor between the "<WebPartPages:XsltListViewWebPart..." and </WebPartPages:XsltListViewWebPart>.

3. Open List View Tools, and click the "Parameters".


If you cannot find List View Tools, follow the steps in this thread.

4. New a parameter. In this case, it is named "variable".


5. Open "Filter".


6. Filter criteria: "Department" list field "Contains" "variable".


7. Save the page.

8. Open the page in browser and edit it.

9. Edit the Current User Filter web part.

(1) Create a connection to list web part.

(2) Connection Type: Get Parameters From


(3) Consumer Field Name: variable


Here is a blog describes how to work list view web part with wildcard searching. This blog is for SharePoint 2010, but the steps in the blog are similar to the steps in SharePoint 2013 using SharePoint Designer.

http://blog.pentalogic.net/2014/05/sharepoint-wildcard-free-text-search-list-view-web-part/

Best regards,

Linda Zhang


这篇关于过滤列表视图,如果当前用户部门包含的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆