Good morning !
I have a really big question, and I found absolutely no good answer to it. I have a SP2013 on premise. I need to display content only by using Content Query WP (my client does not have the good licence to use CSWP). My question is : how to filter my items by "not beginning with" or "not containing"?
What I have :
A site collection named SC, several children displayed by http://SC/s1, http://SC/s2, http://SC/s3, http://SC/s4 and so on... Every of my subsites do have several children of his own. For our example, my subsite s2 has like 3 children named child01, child02 and child03. URLs are as follow : http://SC/s2/children01 ...
I have a CQWP set as follow :
- Source : Display elements from every sites of this site collection
- List Type : Document Libraries
- Content Type : Document Content Type, items from Document (including CT child)
What I want to do:
I would like to set this WebPart to exclude results from a specific subsite (s2) and from every of its children (s2/children01, s2/children02 etc..)
What I did :
I've downloaded my WP and modified its definition. Following the answer by Bishtkuber, i've added "FileRef" as a AdditionalFilterFields and as a CommonViewFields.
Now, I'm struggling with the filter themselves. There is a "Contains" or "Begins with", but there are no opposite of these filters ! no "Does not contain" nor "Does not begin with" !!
What i tried :
I've searched a lot the Internets, and there is no cool response for me : I found this howto exclude terms using a Calculated Column... but this answer is not applicable to my case : I should add a calculated column on every Document Library on every site and subsite. Because my client is allowed to create subsites, it is a problem.
So, do you know how can I add a filter that says "Does not contain" or "Does not begin with" on my CQWP, without creating calculated column, please ?
Thanks a lot. Have a nice day !