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:
- 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?
- 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.
- 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 >-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>