Page 1 of 1

Sorting the Week/Day - Simple view

PostPosted: Thu Aug 18, 2011 10:48 am
by DPmax
The Week/Day - Simple view currently sorts by start time and then ???
I'm looking for a way to sort events in simple view by start time and then a custom ordered value list of the resources (the resources are part of the displayed calc)

I've done some poking and a basic portal sort doesn't get the job done.

Thanks

Re: Sorting the Week/Day - Simple view

PostPosted: Thu Aug 18, 2011 1:11 pm
by JasonYoung
Hi Max,

Right, you won't be able to do this with the portal sorting. Our method is:

Find the records by date range
Sort them by date and time (here's where you'll make this change)
Load them into global variables that the "CalendarRows" fields read directly.

So, changing the sort order before they're loaded into the variables will do this. You can change the sort order (or just add resources to the existing one) in the script:

Sort FileMaker Records --- Edit Sort Orders Here ---

That should do it, but let me know,
-Jason

Re: Sorting the Week/Day - Simple view

PostPosted: Thu Aug 18, 2011 2:30 pm
by DPmax
Thanks for the reply... so simple. Just shows the quality of the original scripting and planning that went into SCC

In CalendarInterface there is FilterGlob_3 and its comment is Orginally Resources, I was looking into using that field in the Sort FileMaker Records --- Edit Sort Orders Here script but it had no impact. What is FilterGlob_3's intended use?

And thanks again for the assistance.

Re: Sorting the Week/Day - Simple view

PostPosted: Thu Aug 18, 2011 2:40 pm
by JasonYoung
Thanks!

That's a global field used in the filtering process, and as a Global, sorting by it won't do anything since it's the same for all records. I'd think you just want to sort by the field in the events table that references the Resource. In our Sample Events table this would just be the Resource field itself, but I'm not sure if you're using that table, or your own; but if it's your table, whatever the equivalent field is.

The filter Globs are the fields that show on the filter tab on the side bar, so you can see what you've selected. FilterGlob_3 is the one on the resources sub-tab:

FilterGlob3.png
FilterGlob3.png (164.28 KiB) Viewed 4673 times


-Jason

Re: Sorting the Week/Day - Simple view

PostPosted: Thu Aug 18, 2011 5:04 pm
by DPmax
Yep, I added CalendarEvents::Resource to the sort for Source 1 based on your first reply (forgot to include that in my reply), worked great.

Thanks for your explanation of FilterGlob_3

Re: Sorting the Week/Day - Simple view

PostPosted: Sun Aug 21, 2011 4:10 pm
by JasonYoung
Cool. Thanks!