0

I have a CQWP that checks the whole site collection for calendars & event items. Using this trick here: http://benprins.wordpress.com/2012/05/20/show-all-fields-and-values-with-xslt/ to get all values I get what's shown below.

The problem is, none of these values are the start time / event date. All I want is to query every calendar event and get the start time/date, shouldn't seem so hard. Any help is appreciated.

ListId = {A4BF1E6E-6A9D-4794-8ED1-15D0E8C007B4}
WebId = {6A60F900-94A7-4EC3-8214-38BE4F1E763E}
ID = 1
_x007B_fa564e0f_x002D_0c70_x002D_4ab9_x002D_b863_x002D_0177e6ddd247_x007D_ = R&D Test
_x007B_94f89715_x002D_e097_x002D_4e8b_x002D_ba79_x002D_ea02aa8b7adb_x007D_ = departments/randd/Lists/Department Calendar/1_.000
_x007B_1d22ea11_x002D_1e32_x002D_424e_x002D_89ab_x002D_9fedbadb6ce1_x007D_ = 1
_x007B_28cf69c5_x002D_fa48_x002D_462a_x002D_b5cd_x002D_27b6f9d2bd5f_x007D_ = 2014-04-22 09:37:35
_x007B_1df5e554_x002D_ec7e_x002D_46a6_x002D_901d_x002D_d85a3881cb18_x007D_ = Jolera
_x007B_d31655d1_x002D_1d5b_x002D_4511_x002D_95a1_x002D_7a09e9b75bf2_x007D_ = Jolera
_x007B_8c06beca_x002D_0777_x002D_48f7_x002D_91c7_x002D_6da68bc07b69_x007D_ = 2014-04-22 09:37:35
_x007B_30bb605f_x002D_5bae_x002D_48fe_x002D_b4e3_x002D_1f81d9772af9_x007D_ = 0
_x007B_ba3c27ee_x002D_4791_x002D_4867_x002D_8821_x002D_ff99000bac98_x007D_ = 0x400000300c231061
_x007B_c5c4b81c_x002D_f1d9_x002D_4b43_x002D_a6a2_x002D_090df32ebb68_x007D_ = 
_x007B_8fca95c0_x002D_9b7d_x002D_456f_x002D_8dae_x002D_b41ee2728b85_x007D_ = 
_x007B_39360f11_x002D_34cf_x002D_4356_x002D_9945_x002D_25c44e68dade_x007D_ = 
_x007B_543bc2cf_x002D_1f30_x002D_488e_x002D_8f25_x002D_6fe3b689d9ac_x007D_ =
_x007B_43bdd51b_x002D_3c5b_x002D_4e78_x002D_90a8_x002D_fb2087f71e70_x007D_ = 1
_x007B_9da97a8a_x002D_1da5_x002D_4a77_x002D_98d3_x002D_4bc10456e700_x007D_ = 
_x007B_845699d6_x002D_5d90_x002D_4d63_x002D_8013_x002D_7e5660143199_x007D_ = Public
PubDate = Tue, 22 Apr 2014 15:37:35 GMT
FileExtension = 
FileSize = 
DocumentIconImageUrl = /_layouts/15/IMAGES/icgen.gif
Title = R&D Test
LinkUrl = https://fourquest.sharepoint.com/departments/randd/Lists/Department Calendar/1_.000
Style = AllValues
GroupStyle = DefaultHeader
__begincolumn = True
__begingroup = False

Upon further investigation I exported the web part and I can see this property:

<property name="DataMappings" type="string">
StartDate:|LinkUrl:|Description:|PubDate:|
_x007B_d31655d1_x002D_1d5b_x002D_4511_x002D_95a1_x002D_7a09e9b75bf2_x007D_:|
_x007B_28cf69c5_x002D_fa48_x002D_462a_x002D_b5cd_x002D_27b6f9d2bd5f_x007D_:|
ImageUrlAltText:|EventDate:|ImageUrl:|
Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;|FileExtension:|FileSize:|
_x007B_64cd368d_x002D_2f95_x002D_4bfc_x002D_a1f9_x002D_8d4324ecb007_x007D_:|</property>

Does anyone know if this information can help me?

1

Content Query web part (CQWP) does not retrieve all the columns by default. If you want to query and render specific columns in the CQWP, you must perform some customization in the .webpart file.

How to query and render Start Time (EventDate) from Calendar list

  1. Edit the properties in the Web Part file to display custom fields. To access the .webpart file for the Web Part, on the Web Part's Edit menu, click Export.
  2. In the .webpart file, locate the CommonViewFields property. Use this property to specify the additional fields that you want to display in the Web Part. Add the internal names of the columns and the type. To query EventDate field from Calendar list, specify the following line:

    <property name="CommonViewFields" type="string" >EventDate;DateTime;</property>
    
  3. Map these internal column names to the columns' Title and Description that are present in the XSLT transformations. To do this, edit the DataColumnRenames property. (optional step)

    <property name="DataColumnRenames" type="string">EventDate,Description</property>
    
  4. Save the .webpart file, import and add web part on the page.

References

How to: Display Custom Fields in a SharePoint Content By Query Web Part (ECM)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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