Today we just resolved a pending issue. Our custom WP which aggregates the latest posts from all the blog sites in our site collection threw up a SQL Error "All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists". We were unable to replicate the issue in our test servers. Even the OOTB CQWP could not surface the blog posts. Pretty strange uh.The fix was pretty simple.
We had two blog sites Site A and Site B. Both the sites had only the default site columns provisioned.
When you try to edit the settings for any column of type "Person or Group" in any SharePoint List, you see an additional dropdown list "Show field". The columns in both the sites need to have the same value in "Show field" when you are querying items from two different lists (SPSiteDataQuery or CrossListInfoQuery)
For example, a column called "Created By" exists for all the Blog posts in Site A and Site B. In Site A the value of the Show field was Display Name and in Site B we had Name (with presence) for the Created By column.
We had two blog sites Site A and Site B. Both the sites had only the default site columns provisioned.
When you try to edit the settings for any column of type "Person or Group" in any SharePoint List, you see an additional dropdown list "Show field". The columns in both the sites need to have the same value in "Show field" when you are querying items from two different lists (SPSiteDataQuery or CrossListInfoQuery)
For example, a column called "Created By" exists for all the Blog posts in Site A and Site B. In Site A the value of the Show field was Display Name and in Site B we had Name (with presence) for the Created By column.
Comments
Post a Comment