Is there a way to customize the sort of events in Calendar Pro? I found a thread pointing to a specific sort script, but I'm not seeing that in the latest version.
I would like to sort by start time, but put events that don't have a start time at the end of the sort order.
Sorting in Calendar Pro
5 posts
• Page 1 of 1
Posts: 41
Joined: Mon Nov 11, 2013 11:12 am |
|
Hi Jason. We consider events with no start time "all-day events", and they appear in their own section at the top of the Day, Week and Schedule views. Are you just saying you'd rather have that all-day section at the bottom of those views instead of at the top? -Jeff
|
|
Posts: 41
Joined: Mon Nov 11, 2013 11:12 am |
Hi Jeff,
The "all day events" are fine as they are on the day and week views, but on the month view they are listed first. This particular client is using them to represent non-events (like a customer pickup). There may be 4 or 5 of those scheduled for a day in addition to 3 or 4 appointments. If I could sort them after the appointments that have a start time, then on the month view, I would see the appointments rather than the all day events. Does this make more sense? Thanks, Jason |
Yeah, that makes sense. You should be able to do that by editing the "ORDER BY" clause in the SQL query. That clause gets added in the "Add Order By" section toward the end of the "Cast Events as Variables - Build Query" script. Right now we're just sorting by the first field in the SELECT clause, which is the starting timestamp field ("ORDER BY 1"). You might have to add a flag field to distinguish "all-day" events from events with start times, then sort by that first ("ORDER BY all_day_flag DESC, 1"). You might also want to add some logic so that only happens on Month View. HTH... Jeff
|
|
Posts: 41
Joined: Mon Nov 11, 2013 11:12 am |
Makes sense. Thanks for pointing out where that is located.
Jason |
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests