Sorting Items kalendarik në Pamjen Calendar

Unë jam duke përdorur një kalendar për të ndjekur diskutime në një ditë të caktuar,,en,Unë kam dy seanca,,en,në mëngjes dhe pasdite,,en,Unë dua për të krijuar një pamje që tregon seanca e mëngjesit e shënuar vetëm alfabetikisht nëpërmjet një ID seancë,,en,Kjo është pak i ndërlikuar për të përmbushur,,en,I lehtë mund të krijojë një pamje të filtruar tregon vetëm ngjarjet e asaj dite,,en,Kalendari do të tregojë të gjitha ato ngjarje dhe në qoftë se ata të gjithë të zhvillohet në të njëjtën orë,,en,ajo liston ato krah për krah në slot orë,,en,Mrekulli,,en,Pjesë e ndërlikuar është se,,en,nga default,,en,ajo dëshiron të listën e tyre në format ID,,en,në qoftë se unë shtoj "Session 02,,en,dhe pastaj "Sesioni 01,,en,me kalendarin,,en,ajo tregon ato në atë mënyrë,,en,dhe pastaj Session,,en,Të lista e tyre në mënyrë Session ID,,en,Mendova për të provoni këto gjëra,,en,Konfiguroni pamjen duke përdorur ndërfaqen e përdoruesit web,,en,nuk ka fat,,en. 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 (nëse kam humbur diçka të vërtetë të dukshme).

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, by default, it wants to list them in ID format. Kështu, if I add "Session 02" and then "Session 01" to the calendar, it shows them in that order (i.e, Seancë 02 and then Session 01). To list them in Session ID order, I thought to try these things:

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

    Since that didn’t work, 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, maybe calendar will as well?

  2. Edit the web part, look for an "export" function and … 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, that leaves 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, but it’s there: "<ListViewXml …. >encoded madness</ListViewXml>". Në mënyrë të veçantë, there’s this gem:

<Pyetje>
<Ku>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Month/>
</Vlerë>
</DateRangesOverlap>
</Ku>
<OrderBy><FieldRef Name="Session_x0020_ID" /></OrderBy>
</Pyetje>

(I’ve decoded the &lt;’s and &gt’s and split them out to multiple lines for clarity’s sake).

Add the <OrderBy> bit and now it sorts by Session ID, not the internal list item ID.

GIGANTIC tip o’ the hat to Becky Isserman for her comment to Isha Sagi’s blog post: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <OrderBy> in the right place without her comment.

I hope to write this up more clearly with screen shots soon, but in case I never do, at least I did this much.

</fund>

2 mendime mbi "Sorting Items kalendarik në Pamjen Calendar

  1. L Hibbs

    Thanks for the info. It works like a charm. I did a similar trick on a multi-field sort (3 Fushat). 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.

Lini një Përgjigju me Harsh Cancel përgjigje

Adresa juaj e emailit nuk do të publikohet. Fusha e kërkuar janë shënuar *