Archive for the ‘CQWP’ Category

SharePoint: CQWP with custom column which is having space in internal name

October 30, 2013 Leave a comment


I was working in some solution, where column display name and internal name is totally different.

but that was not my actual problem.

my actual problem was internal name was having space. for e.g: “Project Name”

here, as we know SharePoint automatically replace space with “_x0020_” so my column internal name became “Project_x0020_Name”.

It is correct when i have added that column in .webpart file with “Commonviewfields” property.

But, i have custom Item XSL file also where i need to show that field value.

And real issue came that i can not use “@Project_x0020_Name” to show value.

So, i got nice solution to keep in mind that,

whenever we had internal column with space, we need use that column in xsl with different way

you can use it like:

<xsl:value-of select=”@Project_x005F_x0020_Name” />

I have not sure about all special characters here. but if you got trouble, ask me we will definitely find the solution.

Keep SharePointing !!!