Here's the scenario:
I have a bunch of lists on my site with similar columns, and I want to make some sort of a dashboard view that will aggregate all the items in these lists.
I thought that a content query would be able to do this easy, but I ran into this issue where it's not displaying custom fields even though I've specified it under common view fields.
For testing, I've created two custom lists on a test site. Both of them have a custom field called Form Type. I've added an item on each list. I've then added a content query on the page that shows all the custom lists on the site and specified the common view field of "Form_x0020_Type"
This is the raw XML that I got back (Edited for brevity):
<dsQueryResponse>
<Rows>
<Row ListId="54AB88B8-62EF-4DFF-9CA1-D85D7B3D89BC"
WebId="F54016CE-2BCE-40BD-AD24-32D1A2C16969"
ID="1"
_x007B_fa564e0f_x002D_0c70_x002D_4ab9_x002D_b863_x002D_0177e6ddd247_x007D_="L2 - I1"
_x007B_94f89715_x002D_e097_x002D_4e8b_x002D_ba79_x002D_ea02aa8b7adb_x007D_="test site/Lists/Test Two/1_.000"
Form_x005F_x0020_Type="" />
<Row ListId="F86FA4EF-A64F-4A12-B349-3C339D5C9E15"
WebId="F54016CE-2BCE-40BD-AD24-32D1A2C16969"
ID="1"
_x007B_fa564e0f_x002D_0c70_x002D_4ab9_x002D_b863_x002D_0177e6ddd247_x007D_="L1 - I1"
_x007B_94f89715_x002D_e097_x002D_4e8b_x002D_ba79_x002D_ea02aa8b7adb_x007D_="test site/Lists/Test One/1_.000"
Form_x005F_x0020_Type="" />
</Rows>
</dsQueryResponse>
As you can see, Form Type is blank on both items. I reconfigured the CQWP so that it only gets items from one of the list instead and this is the XML that I got back (Again, edited):
<dsQueryResponse>
<Rows>
<Row Title="List one - item one"
FileRef="/test site/Lists/List One/1_.000"
FSObjType="0"
File_x005F_x0020_Type=""
Form_x005F_x0020_Type="Choice 1" />
</Rows>
</dsQueryResponse>
This time, with just one list to pull from, the Form Type value comes through.
Is there anything I can do so that custom field values are shown when pulling from multiple lists?

0 commentaires:
Enregistrer un commentaire