Sortiranje stavke kalendara u Kalendar View

I’m using a calendar to track panel discussions on a given day. I have two sessions: morning and afternoon. I want to create a view that shows morning sessions only listed alphabetically via a session ID. This is a little tricky to accomplish (osim ako sam propustio nešto stvarno očito).

I can easily create a filtered view showing just that day’s events. The calendar will show all those events and if they all take place on the same hour, it lists them side by side in the hour slot. That’s great. The tricky part is that, po defaultu, it wants to list them in ID format. Tako, if I add "Session 02" and then "Session 01" u kalendar, to im pokazuje u tom redoslijedu (i.e, Sjednica 02 a zatim sjednica 01). To list them in Session ID order, Mislio sam probati ove stvari:

  1. Configure the view using the web user interface. No luck. There are no options to sort items this way.

    Budući da ne rade, I am now hoping there’s a CAML query somewhere in there that will allow me to override the sort. CQWP lets me make that kind of change, Možda kalendar će, kao i?

  2. Uredi dio web, look for an "export" funkcija i … Bzzzt! I can’t export its XML. There is no export option.

    I’m still holding out hope that I can find and modify some CAML query. Since I can’t export the web part, koji ostavlja SharePoint Designer.

  3. I add the calendar web part to a sandbox site and open that site using SharePoint Designer. I look at the markup for the web part and I find what I’m looking for. It’s encoded madness, ali to je bilo: "<ListViewXml …. >kodirana ludilo</ListViewXml>". Posebno, tu je ovaj dragulj:

<Pitanje>
<Gdje>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Mjesec />
</Vrijednost>
</DateRangesOverlap>
</Gdje>
<OrderBy><FieldRef Name="Session_x0020_ID" /></OrderBy>
</Pitanje>

(Ja sam dekodirao &Bilo;Je i &GT-a, te ih podijeliti van više linija za jasnoću miloga).

Dodaj <OrderBy> bitni i sada se sortira po Session ID, Ne unutarnje stavku popisa ID.

Gigantski savjet ili’ kapa do Becky Isserman za njezinu komentaru na Isha Sagi o blogu: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <OrderBy> na pravom mjestu bez njezina komentaru.

Nadam se da ću napisati ovo gore jasnije zaslon metak uskoro, ali u slučaju da mi nikada ne, barem sam to učinio mnogo.

</kraj>

2 misli o „Sortiranje stavke kalendara u Kalendar View

  1. L Hibbs

    Thanks for the info. It works like a charm. I did a similar trick on a multi-field sort (3 Polja). The only issue with editing the CAML is that if the view is modified, the changes are overwritten. But that is life!

    Thanks for posting!

  2. Harsh

    I had put the tag after . But still it is not applying sorting on my Calendar. Also if I provide ant name in FieldRef value then also it does not throw any error. For e.g. test123 column does not exists in my calendar but if I try to use this field then also the page doesnot throw any error. I am not sure whether the tag is working. I am using SharePoint 2010.

Dopust jedan Odgovor

Vaša email adresa neće biti objavljena. obavezna polja su označena *