SharePoint 2016 view filter by subsite name

%3CLINGO-SUB%20id%3D%22lingo-sub-2160591%22%20slang%3D%22en-US%22%3ESharePoint%202016%20view%20filter%20by%20subsite%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2160591%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20list%20webpart%20who%20give%20project%20info.%26nbsp%3B%3C%2FP%3E%3CP%3ETitle%20of%20the%20project%3C%2FP%3E%3CP%3EDescription%20of%20the%20project.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20list%20is%20create%20at%20the%20site%20collection%20level.%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20fill%20the%20new%20project%20forms%20one%20elements%20is%20create%20in%20this%20list.%26nbsp%3B%3C%2FP%3E%3CP%3EA%20workflow%20start%20at%20the%20creation%20and%20a%20subsite%20is%20create%20for%20the%20new%20project%20with%20a%20subsite%20template.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20create%20another%20list%20at%20the%20site%20collection%20level%20where%20I%20have%20a%20workflow%20who%20start%20at%20the%20creation%20too.%20This%20one%20generate%20user%20access%20for%20the%20subsite.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20goal%20is%20to%20make%20the%20work%20more%20easy%20for%20the%20user%20who%20create%20the%20project.%3C%2FP%3E%3CP%3ESo%20I%20have%20create%20a%20wikipage%20at%20the%20site%20collection%20level%20who%20are%20an%20import%26nbsp%3B%20of%20the%20list%20use%20to%20create%20the%20project.%20I%20have%20create%20this%20page%20in%20SPDesigner%202013%20and%20via%20designer%20I%20have%20export%20this%20page%20like%20custom%20webpart.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELike%20this%2C%20I%20could%20add%20this%20custom%20webpart%20on%20a%20wikipage%20create%20in%20the%20project%20subsite.%3C%2FP%3E%3CP%3ELike%20this%20custom%20webpart%20is%20linked%20with%20the%20list%20at%20the%20site%20collection%20level%2C%20if%20I%20add%20elements%20on%20it%2C%20the%20list%20is%20updated%20at%20the%20site%20collection%20level%20and%20vice%20versa.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20work%20great%2C%20but%20this%20kind%20of%20link%20view%20doesn't%20have%20all%20list%20properties%20Like%20Connection%20option.%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20when%20I%20generate%20a%20new%20subsite%20project%2C%20my%20wikipage%20present%20all%20project%20and%20all%20user%20access.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20goal%20is%20to%20present%20on%20each%20wikipage%20in%20each%20subsite%2C%20only%20the%20information%20in%20link%20with%20this%20project.%26nbsp%3B%3C%2FP%3E%3CP%3EEx%3A%20one%20line%20with%20the%20name%20of%20the%20project%20and%20the%20description%20where%20the%20name%20of%20the%20project%20is%20the%20name%20of%20the%20subsite.%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20If%20i%20create%20a%20project%20name%20test5%2C%20my%20workflow%20create%20a%20subsite%20name%20test5%20with%20the%20URL%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fsharepointxxx.com%2Fsites%2Fproject%2Ftest5%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fsharepointxxx.com%2Fsites%2Fproject%2Ftest5%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20than%20the%20webpart%20present%20only%20the%20elements%20in%20link%20with%20project%20title%20test5.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20find%20than%20I%20could%20create%20a%20view%20filter%20with%20the%20active%20user%20properties.%20When%20I%20check%20the%20code%20of%20the%20page%20I%20have%20this%20query.%20I%20would%20like%20change%20%22UserID%22%20for%20Site%20title.%20But%20each%20test%20I%20have%20make%20give%20an%20error%20or%20no%20result%20in%20the%20list.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CQUERY%3E%3CBR%20%2F%3E%3CWHERE%3E%3CBR%20%2F%3E%3CEQ%3E%3CBR%20%2F%3E%3CFIELDREF%20name%3D%22%26quot%3BAuthor%26quot%3B%2F%22%3E%3CBR%20%2F%3E%3CVALUE%20type%3D%22%26quot%3BInteger%26quot%3B%22%3E%3CBR%20%2F%3E%3CUSERID%20type%3D%22%26quot%3BInteger%26quot%3B%2F%22%3E%3CBR%20%2F%3E%3C%2FUSERID%3E%3CBR%20%2F%3E%3C%2FVALUE%3E%3CBR%20%2F%3E%3C%2FFIELDREF%3E%3CBR%20%2F%3E%3C%2FEQ%3E%3C%2FWHERE%3E%3C%2FQUERY%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BActually%20in%20the%20view%20forms%20I%20use%20a%20filter%20'create%20by'%20with%20the%20connected%20user%20properties%20between%20%5B%20%5D.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20hint%20is%20welcome.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2160591%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%202016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EView%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi, 

 

I have a list webpart who give project info. 

Title of the project

Description of the project. 

 

This list is create at the site collection level. 

When I fill the new project forms one elements is create in this list. 

A workflow start at the creation and a subsite is create for the new project with a subsite template.

 

I have create another list at the site collection level where I have a workflow who start at the creation too. This one generate user access for the subsite.

 

The goal is to make the work more easy for the user who create the project.

So I have create a wikipage at the site collection level who are an import  of the list use to create the project. I have create this page in SPDesigner 2013 and via designer I have export this page like custom webpart. 

 

Like this, I could add this custom webpart on a wikipage create in the project subsite.

Like this custom webpart is linked with the list at the site collection level, if I add elements on it, the list is updated at the site collection level and vice versa. 

 

That's work great, but this kind of link view doesn't have all list properties Like Connection option. 

So when I generate a new subsite project, my wikipage present all project and all user access. 

 

My goal is to present on each wikipage in each subsite, only the information in link with this project. 

Ex: one line with the name of the project and the description where the name of the project is the name of the subsite. 

So If i create a project name test5, my workflow create a subsite name test5 with the URL 

http://sharepointxxx.com/sites/project/test5

 

I would like than the webpart present only the elements in link with project title test5. 

 

I have find than I could create a view filter with the active user properties. When I check the code of the page I have this query. I would like change "UserID" for Site title. But each test I have make give an error or no result in the list. 

<Query>
<Where>
<Eq>
<FieldRef Name="Author"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Where>
</Query>

 

 Actually in the view forms I use a filter 'create by' with the connected user properties between [ ].

 

 

Any hint is welcome.

 

 

 

 

0 Replies