SeedCodeComplete2

Adding Fields

SeedCodeComplete2.AddingFields History

Hide minor edits - Show changes to output

May 14, 2011, at 10:58 PM by 76.22.74.86 -
Added lines 13-18:
There are just a couple things to keep in mind as you map fields:

-> Events with just a single date should have a start date: if your event has just an end date the calendar will fail. The same goes for times: if there is only one time, make it the start time.

-> Don't use calcs for things like the dates, times, or resources. The calendar wants to edit these values when you drag items around, and it can't edit calcs. Use auto-enter calculations instead if you must.

Changed lines 19-26 from:
To add a field to the day or gantt view, create a relationship from CalendarRows to SampleEvents like this:

CalendarEventUIDCalc_FirstValue = _id

Where  _id is the primary key (the unique ID)
in your events table. All this relationship is for is to allow you to add fields right from your events table to the daily view.

Next go to the Day or Gantt Tab of the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file
.
to:
Go to the Day or Gantt Tab of the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from the CalendarEvents table.
January 04, 2011, at 11:52 PM by 166.205.140.47 -
Changed lines 57-65 from:
    Get ( LayoutTableName ) = "SampleEvents" ; // the table occurrence for Source No 1
        Case (
          $$sc_Mode = "Month" ;  SampleEvents::MYField ;
          $$sc_Mode = "Week Sched" ; GetField ( $$sc_FieldForSummary ) ;
          GetField ( $$sc_FieldForSummary ) // Default for other modes
        )
    ; GetField ( $$sc_FieldForSummary ) // Default for other sources/tables
 
)
to:
Get ( LayoutTableName ) = "SampleEvents" ; // the table occurrence for Source No 1
Case ( 
$$sc_Mode = "Month" ;
  SampleEvents::MYField ;
$$sc_Mode = "Week Sched" ; GetField ( $$sc_FieldForSummary ) ;
GetField ( $$sc_FieldForSummary ) // Default for other modes
)
; GetField ( $$sc_FieldForSummary ) // Default for other sources/tables
)
January 04, 2011, at 11:51 PM by 166.205.140.47 -
Changed line 56 from:
  Case (
to:
Case (
January 04, 2011, at 11:50 PM by 166.205.140.47 -
Added lines 5-6:
For example, the contacts table lives in the SeedCodeData.fp7 file. Once SeedCodeComplete is open, grab FileMaker's "Window" menu and select "Show Window / SeedCodeData". Then you can select "Manage / Database" from FileMaker's "File" menu to start defining fields in the contacts table (and any of the other data tables).
August 03, 2010, at 05:09 AM by 76.22.123.157 -
Added lines 1-4:
!! Adding fields to Contacts, Projects, Events, etc.

You can expand any of the tables in SeedCode Complete by adding your own fields. Remember, though, that Complete is a [[Separation Model | Separated]] solution, so new fields will be defined in SeedCodeData.fp7 but be placed on layouts in SeedCodeComplete.fp7

June 21, 2010, at 03:43 PM by 71.231.58.255 -
Changed lines 9-14 from:
'''Day View'''

You can place any fields from your events table right on then Day view of the calendar, and you can even make these fields enterable if you'd like, but there are a few caveats about that
below.

To add a field to
the day view, create a relationship from CalendarRows to SampleEvents like this:
to:
'''Day View & Gantt Chart'''

You can place any fields from your events table right on then Day view of the calendar, and you can even make these fields enterable if you'd like, but there are a few caveats about that
below. (The same is true for the left, white column of the Gantt chart, where the event and project names are.)

To add a field to the day or gantt
view, create a relationship from CalendarRows to SampleEvents like this:
Changed lines 19-22 from:
Next go to the Day Tab of the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.

Next, change the Refresh Window step at the end of the "Refresh Calendar..." script to use the Fluch Cached Join Results option. If you're on a Mac you can leave it like this but if you're on windows or want the best possible performance you can wrap it in an If statement so it uses the Flush option only when $$sc_Mode = "Day Sched" and uses a regular refresh elsewhere
.
to:
Next go to the Day or Gantt Tab of the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.
Added lines 25-26:
This isn't an issue on the Gantt Chart as that only shows records from Source No 1 anyway.
April 11, 2010, at 01:50 AM by 76.22.123.157 -
Added lines 21-22:
Next, change the Refresh Window step at the end of the "Refresh Calendar..." script to use the Fluch Cached Join Results option. If you're on a Mac you can leave it like this but if you're on windows or want the best possible performance you can wrap it in an If statement so it uses the Flush option only when $$sc_Mode = "Day Sched" and uses a regular refresh elsewhere.
March 04, 2010, at 04:52 PM by 76.22.123.157 -
Added lines 60-61:
Note that if you will only ever have one source you can dispense with the Get ( LayoutTableName ) test-- this does add a slight bit of weight to the calendar. If you dispense with this you'd remove the first two lines, and the last two lines from the calc above.
March 04, 2010, at 04:50 PM by 76.22.123.157 -
Changed line 29 from:
! Changing the fields that display per tab
to:
! Changing fields per tab
March 04, 2010, at 04:49 PM by 76.22.123.157 -
Changed lines 32-35 from:
'''Overview.''' Yes. The section above describes how you can add your own fields to the Day view, but you can also change what shows up on other views. In this example we'll describe how to set the Month view to show just a field in your events table called "My Field", leaving the other views to show the field(s) you've mapped to the calendar's Summary.

'''The Modification.''' Begin by backing up a copy of your file. ;-)
to:
'''Overview'''

Yes. The section above describes how you can add your own fields to the Day view, but you can also change what shows up on other views. In this example we'll describe how to set the Month view to show just a field in your events table called "My Field", leaving the other views to show the field(s) you've mapped to the calendar's Summary.

'''The Modification'''

Begin by backing up a copy of your file. ;-)
March 04, 2010, at 04:49 PM by 76.22.123.157 -
Changed lines 42-43 from:
to the code below where "SampleEvents" is the name of the table occurrence for Source No 1 in your file, and "SampleEvents::MYField" is the name of the field you wish to show on the month view. Note that the case statement here lets you specify different settings for other views as well, and leaves the mapped field, represented by GetField ( $$sc_FieldForSummary ) as the default for other views and other sources.
to:
...to the code below where "SampleEvents" is the name of the table occurrence for Source No 1 in your file, and "SampleEvents::MYField" is the name of the field you wish to show on the month view. Note that the case statement here lets you specify different settings for other views as well, and leaves the mapped field, represented by GetField ( $$sc_FieldForSummary ) as the default for other views and other sources.
March 04, 2010, at 04:15 PM by 76.22.123.157 -
Changed lines 29-30 from:
! Can I show different fields on some views of the calendar?
to:
! Changing the fields that display per tab
!
! Can I show different fields on some views of the calendar?
March 04, 2010, at 04:14 PM by 76.22.123.157 -
Changed lines 29-30 from:
!! Can I show different fields on some views of the calendar?
to:
! Can I show different fields on some views of the calendar?
March 04, 2010, at 04:02 PM by 76.22.123.157 -
Changed lines 35-38 from:
1. Edit the script "Write One FileMaker Event in iCal Format" and find the line where we're setting the variable $scical_Summary.

2. Change that calc from this...
to:
'''1.''' Edit the script "Write One FileMaker Event in iCal Format" and find the line where we're setting the variable $scical_Summary.

'''2.''' Change that calc from this...
Changed lines 41-43 from:
to this...

Case
(
to:
to the code below where "SampleEvents" is the name of the table occurrence for Source No 1 in your file, and "SampleEvents::MYField" is the name of the field you wish to show on the month view. Note that the case statement here lets you specify different settings for other views as well, and leaves the mapped field, represented by GetField ( $$sc_FieldForSummary ) as the default for other views and other sources.

 
Case (
Changed line 46 from:
           $$sc_Mode = "Month" ;  SampleEvents::Status ;
to:
           $$sc_Mode = "Month" ;  SampleEvents::MYField ;
Changed lines 51-57 from:
)
to:
  )

For your reference, here is a list of all the possible modes in the calendar and the views they represent: [[Modes In The Calendar]].

'''3.''' At this point, MyField will show up on the month view beside the event's time if there is one. If you'd like to remove the time as well, edit the script "Format Event Time --- Edit Time Formats for Events Here ---". Edit the very last SetVariable statement in the script and you'll see that right at the beginning, on the 4th line, we've commented out a line about the Day View. Uncomment this line changing the mode form "Day Sched" to "Month" and you'll have remove times from displaying on the month view.

Enjoy!
March 04, 2010, at 03:55 PM by 76.22.123.157 -
Changed lines 27-51 from:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend the OnObjectSave trigger) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.
to:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend the OnObjectSave trigger) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.

!! Can I show different fields on some views of the calendar?

'''Overview.''' Yes. The section above describes how you can add your own fields to the Day view, but you can also change what shows up on other views. In this example we'll describe how to set the Month view to show just a field in your events table called "My Field", leaving the other views to show the field(s) you've mapped to the calendar's Summary.

'''The Modification.''' Begin by backing up a copy of your file. ;-)

1. Edit the script "Write One FileMaker Event in iCal Format" and find the line where we're setting the variable $scical_Summary.

2. Change that calc from this...

GetField ( $$sc_FieldForSummary )

to this...

Case (
    Get ( LayoutTableName ) = "SampleEvents" ; // the table occurrence for Source No 1
        Case (
          $$sc_Mode = "Month" ;  SampleEvents::Status ;
          $$sc_Mode = "Week Sched" ; GetField ( $$sc_FieldForSummary ) ;
          GetField ( $$sc_FieldForSummary ) // Default for other modes
        )
    ; GetField ( $$sc_FieldForSummary ) // Default for other sources/tables
)
January 20, 2010, at 01:39 AM by 76.22.123.157 -
Changed lines 13-16 from:
To add a field to the day view, first go to the Day Tab of the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.

Note that we have a relationship from Calendar Rows to Sample Events: all this relationship is for is
to allow you to add fields right from your events table to the daily view. This relationship is true only if there are no are overlapping events: if there are, we don't show any individual fields.
to:
To add a field to the day view, create a relationship from CalendarRows to SampleEvents like this:

CalendarEventUIDCalc_FirstValue = _id

Where
  _id is the primary key (the unique ID) in your events table. All this relationship is for is to allow you to add fields right from your events table to the daily view.

Next go to the Day Tab of
the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.
January 09, 2010, at 05:54 PM by 76.22.123.157 -
Changed lines 23-25 from:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend the OnObjectSave trigger) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.

You'll see that the status field in our calendar example is set up this way
.
to:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend the OnObjectSave trigger) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.
December 20, 2009, at 04:51 AM by 76.22.123.157 -
Changed lines 23-24 from:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend OnObjectSave) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.
to:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend the OnObjectSave trigger) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.
December 20, 2009, at 04:49 AM by 76.22.123.157 -
Changed lines 5-8 from:
Most of the formatting of how things look in the calendar is done on the Source No X layout(s) where you specify which field (perhaps a calc) is used for the Summary-- that is the event attribute we show on all the calendar screens. Using a calc for your Summary field lets you show  whatever you like on the calendar (perhaps a user's initials and then the event description, for example).

But on the Daily View you have a bit more room and may want to show something besides just the Summary.
to:
Most of the formatting of how things look in the calendar is done on the Source No X layout (Source No 1, etc.) where you specify which field (perhaps a calc) is used for the Summary-- that is the event attribute we show on all the calendar screens. Using a calc for your Summary field lets you show  whatever you like on the calendar (perhaps a user's initials and then the event description, for example).

But on the Day View you have a bit more room and may want to show something besides just the Summary.
November 19, 2009, at 03:07 AM by 76.22.123.157 -
Changed lines 15-16 from:
Note that we have a relationship from Calendar Rows to Sample Events: all this relationship is for is to allow you to add fields right from your events table to the daily view. This relationship is true for the first event (if there are are overlapping events) and for the first row of the event's time (if the event spans multiple rows). 
to:
Note that we have a relationship from Calendar Rows to Sample Events: all this relationship is for is to allow you to add fields right from your events table to the daily view. This relationship is true only if there are no are overlapping events: if there are, we don't show any individual fields.
Changed lines 23-25 from:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend OnObjectSave) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.
to:
Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend OnObjectSave) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.

You'll see that the status field in our calendar example is set up this way
.
November 16, 2009, at 04:15 AM by 76.22.123.157 -
Changed lines 13-14 from:
To add a field to the day view, first go to the Day Tab of the calendar in layout mode (see [[EditLayouts | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.
to:
To add a field to the day view, first go to the Day Tab of the calendar in layout mode (see [[Calendar Tabs | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.
November 16, 2009, at 04:06 AM by 76.22.123.157 -
Changed lines 3-5 from:
Day View

Other Views
to:
'''Overview'''

Most of the formatting of how things look in the calendar is done on the Source No X layout(s) where you specify which field (perhaps a calc) is used for the Summary-- that is the event attribute we show on all the calendar screens. Using a calc for your Summary field lets you show  whatever you like on the calendar (perhaps a user's initials and then the event description, for example).

But on the Daily View you have a bit more room and may want to show something besides just the Summary.

'''Day View'''

You can place any fields from your events table right on then Day view of the calendar, and you can even make these fields enterable if you'd like, but there are a few caveats about that below.

To add a field to the day view, first go to the Day Tab of the calendar in layout mode (see [[EditLayouts | Editing the Calendar Layouts]] if you don't know how to get to the day tab in layout mode). Then simply add fields from your event table-- that would be a field from Sample Events in the original calendar file.

Note that we have a relationship from Calendar Rows to Sample Events: all this relationship is for is to allow you to add fields right from your events table to the daily view. This relationship is true for the first event (if there are are overlapping events) and for the first row of the event's time (if the event spans multiple rows).

'''Multiple Data Sources'''

And, obviously, this only works for one table at a time unless you'd like to set up similar relationships to each of your FileMaker events tables-- if your primary keys are all prefixed, only one relationship will be "true" at a time, so you can stack fields form other events this way. If your primary keys aren't prefixed get in touch with SeedCode as we have some custom solutions that can help with this.

'''Enterable Fields'''

Note that if you allow entry to fields in your events table you may edit information that should cause an event to move or change color. Yet FileMaker won't know to do this just because you edit the field. In such cases you'll need a script trigger on your field (we recommend OnObjectSave) that will call the script "Refresh Calendar { UseExistingData ; DontRefresh }". Don't send any parameters to the script.
October 21, 2009, at 02:41 PM by 76.22.123.157 -
Added lines 1-5:
!! How can I add my own fields to the calendar?

Day View

Other Views
(855) SEEDCODE
[email protected]
Follow us: