Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm reading up on the Content Query web part and based on this page, I can't understand the difference between the CommonViewFields property vs the ViewFieldsOverride property. How are they different?

Thanks!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

OK, was looking into this and i 'think' i got it!

Using neither you will get only the base fields available in the link you posted.

Using only CommonViewFields you will get the base fields AND the fields added by the CommonViewFields property.

Finally, Using ViewFieldsOverride, it will NOT pull the base fields, and ONLY pull the fields you specify with the ViewFieldsOverride.

So if you want to be as efficient as possible and only pull what you need, use ViewFieldsOverride. If you have single CQWP on a page with a small amount of information, you could just use the CommonViewFields to pull what you need.

If someone could confirm what i said, i would appreciate it.

share|improve this answer
    
That appears right- I changed the ViewFieldsOverride property and it reduced the fields being returned in the XML that gets input to the xsl transform. I wasn't using a custom content type, so I didn't verify that CommonViewFields was including the base fields + whatever was specified there, but I suspect this is right. Thanks! =) –  skjejee Mar 22 '12 at 15:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.