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 (mura rud é gur chaill mé rud éigin fíor-shoiléir).
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, de réir réamhshocraithe, it wants to list them in ID format. Mar sin,, if I add "Session 02" and then "Session 01" an fhéilire, Léiríonn sé iad san ord sin (i.e, Seisiún 02 agus ansin Seisiún 01). To list them in Session ID order, Shíl mé chun iarracht a dhéanamh na rudaí seo:
- Configure the view using the web user interface. No luck. There are no options to sort items this way.
Ós rud é nach raibh an obair, 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, b'fhéidir beidh féilire chomh maith le?
- Cuir an chuid gréasáin, look for an "export" fheidhm agus … Bzzz! 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, a fhágann SharePoint Dearthóir.
- 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, ach tá sé ann: "<ListViewXml …. >madness ionchódaithe</ListViewXml>". Go sonrach, níl an GEM:
<Iarratas>
<I gcás>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Mí />
</Luach>
</DateRangesOverlap>
</I gcás>
<Orderby><FieldRef Name="Session_x0020_ID" /></Orderby>
</Iarratas>
(Tá mé decoded an <'S agus > agus roinneadh iad amach chun línte éagsúla ar mhaithe le soléireacht ar).
Cuir an <Orderby> giotán agus anois tá sé cineál le ID Seisiún, nach bhfuil an liosta inmheánach mír ID.
Tip gigantic nó’ an hata a Becky Isserman as a cuid tuairimí a blog post Isha Sagi ar: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <Orderby> san áit cheart gan a comment.
Tá súil agam a scríobh suas seo níos soiléire le shots scáileán go luath, ach ní i gcás mé, ar a laghad, Rinne mé seo i bhfad.
</deireadh>