SeedCodeCalendar12

Resources

Overview

Your events can be linked to "resources" in the Pro calendar; a resource can be anything you need to schedule--people, equipment, rooms--or a mix of those. An event can even be linked to more than one resource.

Resources are shown on the Schedule and Grid views of the calendar, where you can drag events from one resource to another to balance your schedule.

How can I show MY resources in the calendar?

Resouces are loaded in the script "Load Resources" whenever the calendar starts up.

This script looks for a value list named "Resources" and will use the contents of that list as your list of possible resources. If it doesn't find a value list with that name, it uses a hard coded list in a Set Variable () following the comment "hard coded list follows". You can also just type your resources into that calc the same way we have done our sample resources.

Note that they'll appear on the calendar in the order you list them in this hard coded list or in the order they appear in your value list.

When you pasted the calendar into your file you should have mapped a field in your events table to our "resource" on the Resources tab of your Source No X layout. On this layout you can pick any field from your events table to represent your "resource": be it a staff member, a piece of equipment, a room-- as long as it is depicted by a field in your events table.

Changing the value list of resources.

After you change the value list of resources, run the Upon Opening script again to see your changes take effect.

Managing large numbers of resources.

If you have a ton of resources to manage you may want to partition the resources value list in several different lists. You can see a nice movie of this in action here along with instructions for making this change in your copy of the calendar.

Working with multiple types of resources (more than 1 resource field per event).

You can also maintain multiple lists of different kinds of resources (e.g., Rooms, Teachers and Levels), where each event may have one or more resource of each type. You can then let your users choose which ones to display in the column headers on the Schedule and Grid views. Read about it here.

What if I have a table I'd like to use for resources?

No problem. The calendar considers its resources from within the variable "$$sc_ResourceList" so all you have to do is populate that variable with the resource names from your table: this is probably most easily done using the List() function from a layout that has a relationship to all your resources.

If you'd like to use this method to assign your resources into the $$sc_ResourceList variable, do so by editing the script "Load Resources" and include something like this:

Go to Layout [Some layout with a relationship to all your resources.]
Set Variable [$$sc_ResourceList ; List ( Relationship::ResourceName )]
Go to Layout [original layout]

Note that you could also loop through your resource records instead of using List(). In either case, be sure to either sort your relationship (if using List) or sort your resource records (if looping) as resources will be displayed in the order they appear in $$sc_ResourceList.

You can also populate the $$sc_ResourceList variable with a SQL statement. One advantage of this is that you don't need to leave your current layout; another is that your SQL statement can include the sort order in it. If you're not used to writing SQL queries, feel free to use our (free) SQL explorer to help you write the query.

Can I display the resource in Schedule and Grid view if I'm using the ID?

Yes. If you change the fields that show the resource ID in Schedule and Grid views to a pop-up field control and assign them to a value list that's set to only show the second field of the resources (the name) then that's what will display there, even when not in focus. Those fields aren't editable in either the Schedule or Grid views, so there's no danger of selecting them, but you'll probably need to futz with the borders a little to make them look right, as making them a pop-up puts a border on them by default.

Can I have multiple resources per event?

Yes, support for this is already built into the calendar. You'll probably want to change the Event Details layout, however, formatting the resource field as checkboxes (for example) instead of as a drop down list. Here are some things to keep in mind regarding how multiple resources work:

Resources must be in the field mapped on the "resources" tab of your Source No X layout (you probably did this during integration).
That mapped field may hold a return separated list of resources (as would be created if you entered resources through a field formatted as check boxes).
You can drag an event on the schedule screen from one resource column to another; when you do you'll be swapping out the new resource for the resource you dragged from. Other resources for the event remain intact.
Here is a short movie of this in action.
(855) SEEDCODE
[email protected]
Follow us: