Page 1 of 2

Mod: Partitioning Resources

PostPosted: Wed Mar 23, 2011 8:36 am
by John Sindelar

If you have large numbers of resources (rooms, people, trucks, etc.) you may find scrolling through them less than ideal.

Jason Young has written a nice mod where you can partition your resources into groups, showing only the resources relevant to the task at hand. This is something you can easily add your own SeedCode deployment.


See this in action here:

The Mod.

1. Back up your file. (seriously)

2. Set up multiple Value Lists to represent your different groups:

You'll probably also want one called "all resources" that contains the names of all your resources.

3. Create another new value list made up of the names of the above value lists. We'll call it ValueLists:

4. Create a new global field in the table CalendarInterface called ValueList. Place that field on the Calendar Layout where you can get to it from the Schedule and Grid views (sidebar?). Make the field a drop-down and assign the value list ValueLists to it. This will tell the script which Resource value list you want to load.

5. Go into the script: "Load Resources" the first script step is assigning the variable $sc_Resources with the following calculation:

ValueListItems ( Get ( FileName ) ; "Resources" )

Change this to

ValueListItems ( Get ( FileName ) ; CalendarInterface::ValueList )

This tells the script which group you have selected.

6. Edit the script "Refresh Calendar { UseExistingData ; DontRefresh }" and call the script "Load Resources" at the very beginning of this script.

That's it!

You'll probably want to set up a default value for CalendarInterface::ValueList, otherwise you'll get the default resources if it's empty. You can set it during the "Upon Opening" script.

You'll also need to hit the refresh button when you change Value Lists / Resource Groups, be fancy you could put an "On Object Modify" script trigger on your drop down and have it run the script: "Refresh Calendar { UseExistingData ; DontRefresh }"


Re: Mod: Partitioning Resources

PostPosted: Wed Jun 15, 2011 12:36 am
by micai
Dear John, I have Calendar Pro 51F860517.
Why, executed the your instructions (and also of Jason Young), after insert the event, I do not succeed to see the events, neither inserting them manually in the layout “Event List”?
Are the instructions tested?
Thank you

Re: Mod: Partitioning Resources

PostPosted: Wed Jun 15, 2011 6:26 am
by JasonYoung

Thanks for the post. If the resource name in the event matches the name in the value list, then it should show up. I'll send you a copy of the file (offline) so you can take a look at how we set it up.


Re: Mod: Partitioning Resources

PostPosted: Sun Aug 19, 2012 10:47 am
by audreyrae
Hey there, Mr.Jason!

Thanks for this. It's just what my client needed for managing hundreds of resources and it was *so* easy to implement. Works perfectly!

All the Best,


Re: Mod: Partitioning Resources

PostPosted: Mon Aug 20, 2012 6:41 am
by JasonYoung
Wonderful Audrey!

Good to hear and Thanks!!!

Re: Mod: Partitioning Resources

PostPosted: Thu Feb 28, 2013 6:51 pm
by RLMcCord
I am attempting to follow your instructions but cannot find the Script "Refresh Calendar { UseExistingData ; DontRefresh }. Did the name change to just Refresh Calendar in the Fliemaker Pro 12 version?



Re: Mod: Partitioning Resources

PostPosted: Fri Mar 01, 2013 5:51 am
by jeffalmquist
Hi Rich - Indeed it did. When we re-wrote the Calendar in FM 12, we simplified that script and those parameters were no longer needed.


Re: Mod: Partitioning Resources

PostPosted: Mon Jul 08, 2013 11:01 am
by IllyssaT
I just recently purchased this program and I am trying to do the different Resources.

I put in this information and did all the changes, instead of just showing the resources I want, it opens up a random event in the Event Details pop up. Did I do something wrong?


It looks like the glitch (most likely user error) cleared itself but now the resource lists aren't refreshing themselves even after I click refresh. I can't change the resource list at all. It's kind of stuck.

Re: Mod: Partitioning Resources

PostPosted: Mon Jul 08, 2013 4:51 pm
by jeffalmquist
It does sound like something has gone wrong. I would suggest trying again with a fresh copy of the calendar file. Watch the video and follow the instructions carefully. If you still have trouble, send me your file (to and I'll help you figure it out.

Re: Mod: Partitioning Resources

PostPosted: Tue Jun 03, 2014 6:24 am
by AirDog
I am working on the newer version of the Calendar (7.23). I followed all the instructions with the exception of #6 where you edit the Refresh Calendar step as I can't find this exact script to edit.

While it works, it does not refresh properly. The drop down with the two value list work as it should but to make it display the new resources properly I must go to the Filters tab\Resources sub tab and toggle the Include/Omit slider. Once do this, the resources from my value list show properly.

I tried to refresh using the "Refresh" selection at the top of the Calendar but this does not help.

Any ideas.



Re: Mod: Partitioning Resources

PostPosted: Tue Jun 03, 2014 7:37 am
by jeffalmquist
Hi Robert. You definitely need to edit the "Refresh Calendar" calendar script. Was it deleted or renamed in your file? What happens when you search for that script in the Manage Scripts window?

Re: Mod: Partitioning Resources

PostPosted: Tue Jun 03, 2014 8:02 am
by AirDog
Hi Jeff. Ok, I found the script and added the "Load Resources". It now updates when I press the "Refresh" button but not when I change the Value List.

What needs to be down for it to update automatically when I change the Resouce Selection via the Value List setup.



Please disregard, I figured out what to do! Thanks

Re: Mod: Partitioning Resources

PostPosted: Sat Oct 04, 2014 8:15 am
by Germain Doucet
The changes I made are working perfectly, but I only have one question. What about Resources Filters, they are not working anymore. Is there a step to add so that I can filtler by my new Resources?

Re: Mod: Partitioning Resources

PostPosted: Mon Oct 06, 2014 2:51 am
by jeffalmquist
Hi Germain. This mod shouldn't affect your ability to filter by resource. You might also check out this slightly different approach: viewtopic.php?f=25&t=3845

Re: Mod: Partitioning Resources

PostPosted: Sat Dec 06, 2014 10:42 am
by wsmiii
I've run into a very strange problem with this modification.

I set it up and it initially worked fine. However, what I've since experienced is that it works some times, but not others. That is - it is either working or not working upon launching the Calendar, before I interact with it at all. I should note that I have the Calendar launch directly into the Calendar layout itself (not your original "Home" layout), sometimes into the Week tab and sometimes into the Schedule tab (depending on what kind of user has logged in.)

The mod works fine about 1/2 the time, Filemaker Pro 11 or Filemaker Pro 11 Advanced, Mac or PC, Filemaker Pro application pre-launched or launching with the Calendar.

When it doesn't work I find that the script step "Set Variable [$Sc_Resources; Value:ValueListItems (Get ( Filename ) ; CalendarInterface::ValueList" (added to the Load Resources script) fails to initialize $Sc_Resources with any values. Because Sc_Resources is empty the default values are assigned in subsequent steps.

Following other launches the variable is assigned the appropriate list by "Set Variable [$Sc_Resources; Value:ValueListItems (Get ( Filename ) ; CalendarInterface::ValueList" and the mod works perfectly. And I haven't changed a thing!

My Calendar is based on Seedcode Calendar Pro 5.6.

What could cause that? Something about how the Calendar was exited on previous use?