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 (a non ser que eu perda algo de verdade obvia).
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, por defecto, it wants to list them in ID format. Así, se eu engadir "Sesión 02" e despois da sesión "01" para o calendario, mostra-las nesta orde (i.e, Sesión 02 e, a continuación Sesión 01). To list them in Session ID order, Eu penso que tratar isto:
- Configure the view using the web user interface. No luck. There are no options to sort items this way.
Sempre que non funcionou, 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, quizais calendario vai ben?
- Editar a parte web, look for an "export" función e … 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, que deixa SharePoint Design.
- 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, pero está aí: "<ListViewXml …. >loucura codificada</ListViewXml>". Especificamente, hai esta xoia:
<Pregunta>
<Onde>
<DateRangesOverlap>
<FieldRef Name = "EVENTDATE" />
<FieldRef Name = "EndDate" />
<FieldRef Name = "RecurrenceID" />
<Tipo value = "datetime">
<Mes />
</Valor>
</DateRangesOverlap>
</Onde>
<OrderBy><FieldRef Name = "Session_x0020_ID" /></OrderBy>
</Pregunta>
(Eu teño decodificado o <'S e > e división los para fóra varias liñas para unha cuestión de claridade).
Engadir o <OrderBy> pouco e agora clasifica por ID de sesión, non o ID do elemento interna lista.
Xigantesca punta o’ o sombreiro para Becky Isserman polo seu comentario ao post do blog Isha Sagi: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <OrderBy> no lugar seguro sen o teu comentario.
Espero escribir isto máis claramente con pantallas en breve, pero no caso eu non fago, polo menos eu fixen iso moi.
</final>