SharePoint 2013 content search query web part with value from list

1.2k Views Asked by At

I am using a content search query web part in a team site (not the rootweb) in a couple of site collections. I am querying all (list) items in the web application that have a content type with a specific ID:

ContentTypeID:Some ID

I also want the query to only look for items where the Title column contains a specific value:

Title:Some value

The ID of the content type is not a problem because it's static, but the value of the Title column varies for each site collection. For each site collection this value is stored in a certain column X in a list item that's in a list in the rootweb. (The list contains only 1 list item.)

Does anybody know how I can get the value of the column X into the query to replace Some value in my example? Or does anybody has an idea how to store the dynamic value for the Title column in each site collection so it can be used within the query?

1

There are 1 best solutions below

0
On

Create a calculated column that has the same name in every list, which contains the value of the "variable" column. Include that calculated column in the search and query on that column.