DayBackForFileMaker

Separation Colors

DayBackForFileMaker.SeparationColors History

Hide minor edits - Show changes to output

Changed lines 7-48 from:
Create a Cartesian (the "x" operator) relationship in your data file to the "CalendarColors" table from any other table (your "Events" T.O. perhaps?). Then make a new layout called "Assign Colors", based on that same T.O. (e.g., "Events"), and copy/paste the Calendar Colors portal from the "Assign Colors" layout in the interface file.

Then create a new script in your data file called "Apply Color Settings in Data File" by copy/pasting only the steps shown below from the Calendar file's "Apply Color Settings { Close ; DontRefresh }" script.

-> # \\
Go to Layout ["Assign Colors" (Events)] \\
# \\
Loop \\
#
--> Set Variable [$sc_namesVariable; Value:Let ( [ \\
s = CalendarColors::Name ; \\
s = Substitute ( Lower ( s ) ; \\
["\"" ; "" ] ; \\
["(" ; "" ] ; \\
[")" ; "" ] ; \\
["+" ; "" ] ; \\
["-" ; "" ] ; \\
[">" ; "" ] ; \\
["<" ; "" ] ; \\
["=" ; "" ] ; \\
["&#8800;" ; "" ] ; \\
["&#8804;" ; "" ] ; \\
["&#8805;" ; "" ] ; \\
["&" ; "" ] ; \\
["^" ; "" ] ; \\
["/" ; "" ] ; \\
["*" ; "" ] ; \\
[" or " ; "" ] ; \\
[" and " ; "" ] ; \\
[" not " ; "" ] ; \\
[" xor " ; "" ] ; \\
[" if " ; "" ] ; \\
[";" ; "" ] \\
) ] ; \\
Evaluate ( "Let ( $$sc_Color" & s &" = " & CalendarColors::ColorRBGValue & " ; \"\" )" ) ) ] \\
# \\
Go to Portal Row [Select; Next; Exit after last]
-> # \\
End Loop \\
# \\
Go to Layout [original layout] \\
#
to:
Create a Cartesian (the "x" operator) relationship in your data file to the "CalendarColors" table from any other table (your "Events" T.O. perhaps?). Then make a new layout called "Calendar Status Colors", based on that same T.O. (e.g., "Events"), and copy/paste the layout contents from the "Calendar Status Colors" layout in the interface file.

Then copy and paste the "Load Calendar Color Coding" script from the interface file into the data file.
Changed lines 3-5 from:
If your calendar interface and your event-data tables are in different files, ("the separation model"), and you want to show an event's color "on" the event record in list view and in the Event Details mini window, you'll need a table occurrence for the "CalendarRows" table in your data file (it doesn't need to be related to any other T.O.), and you'll need to add the "z_sc_ColorCalc" field from our SampleEvents table into the Events table in your data file (just copy/paste it if you have FileMaker Advanced).

The "z_sc_ColorCalc" field looks for global variables that are now scoped to your interface file, so you need to create these variables in your data file as well. Here's how:
to:
If your calendar interface and your event-data tables are in different files, ("the separation model"), and you want to show an event's color "on" the event record in list view and in the Event Details mini window, you'll need a table occurrence for the "CalendarColors" table in your data file (it doesn't need to be related to any other T.O.), and you'll need to add the "DBK_ColorCalc" field from our SampleEvents table into the Events table in your data file (just copy/paste it if you have FileMaker Advanced).

The "DBK_ColorCalc" field looks for global variables that are now scoped to your interface file, so you need to create these variables in your data file as well. Here's how:
April 17, 2013, at 02:09 PM by 67.190.87.90 -
Changed lines 3-11 from:
-> If your calendar interface and your event-data tables are in different files, ("the separation model"), and you want to show an event's color "on" the event record in list view and in the Event Details mini window, you'll need a table occurrence for the "CalendarRows" table in your data file (it doesn't need to be related to any other T.O.), and you'll need to add the "z_sc_ColorCalc" field from our SampleEvents table into the Events table in your data file (just copy/paste it if you have FileMaker Advanced).

-> The "z_sc_ColorCalc" field looks for global variables that are now scoped to your interface file, so you need to create these variables in your data file as well. Here's how:

-> Create a Cartesian (the "x" operator) relationship in your data file to the "CalendarColors" table from any other table (your "Events" T.O. perhaps?). Then make a new layout called "Assign Colors", based on that same T.O. (e.g., "Events"), and copy/paste the Calendar Colors portal from the "Assign Colors" layout in the interface file.

-> Then create a new script in your data file called "Apply Color Settings in Data File" by copy/pasting only the steps shown below from the Calendar file's "Apply Color Settings { Close ; DontRefresh }" script.

--> # \\
to:
If your calendar interface and your event-data tables are in different files, ("the separation model"), and you want to show an event's color "on" the event record in list view and in the Event Details mini window, you'll need a table occurrence for the "CalendarRows" table in your data file (it doesn't need to be related to any other T.O.), and you'll need to add the "z_sc_ColorCalc" field from our SampleEvents table into the Events table in your data file (just copy/paste it if you have FileMaker Advanced).

The "z_sc_ColorCalc" field looks for global variables that are now scoped to your interface file, so you need to create these variables in your data file as well. Here's how:

Create a Cartesian (the "x" operator) relationship in your data file to the "CalendarColors" table from any other table (your "Events" T.O. perhaps?). Then make a new layout called "Assign Colors", based on that same T.O. (e.g., "Events"), and copy/paste the Calendar Colors portal from the "Assign Colors" layout in the interface file.

Then create a new script in your data file called "Apply Color Settings in Data File" by copy/pasting only the steps shown below from the Calendar file's "Apply Color Settings { Close ; DontRefresh }" script.

-> # \\
Changed line 16 from:
---> Set Variable [$sc_namesVariable; Value:Let ( [ \\
to:
--> Set Variable [$sc_namesVariable; Value:Let ( [ \\
Changed line 44 from:
--> # \\
to:
-> # \\
Changed line 50 from:
-> Make sure this script runs when your data file opens (note that if this script is set up to be triggered by "OnFirstWindowOpen" and your data file never actually opens in a window, these color settings won't be propagated).
to:
Make sure this script runs when your data file opens (note that if this script is set up to be triggered by "OnFirstWindowOpen" and your data file never actually opens in a window, these color settings won't be propagated).
April 17, 2013, at 02:07 PM by 67.190.87.90 -
Added lines 1-50:
!! Event colors in list view and mini windows

-> If your calendar interface and your event-data tables are in different files, ("the separation model"), and you want to show an event's color "on" the event record in list view and in the Event Details mini window, you'll need a table occurrence for the "CalendarRows" table in your data file (it doesn't need to be related to any other T.O.), and you'll need to add the "z_sc_ColorCalc" field from our SampleEvents table into the Events table in your data file (just copy/paste it if you have FileMaker Advanced).

-> The "z_sc_ColorCalc" field looks for global variables that are now scoped to your interface file, so you need to create these variables in your data file as well. Here's how:

-> Create a Cartesian (the "x" operator) relationship in your data file to the "CalendarColors" table from any other table (your "Events" T.O. perhaps?). Then make a new layout called "Assign Colors", based on that same T.O. (e.g., "Events"), and copy/paste the Calendar Colors portal from the "Assign Colors" layout in the interface file.

-> Then create a new script in your data file called "Apply Color Settings in Data File" by copy/pasting only the steps shown below from the Calendar file's "Apply Color Settings { Close ; DontRefresh }" script.

--> # \\
Go to Layout ["Assign Colors" (Events)] \\
# \\
Loop \\
#
---> Set Variable [$sc_namesVariable; Value:Let ( [ \\
s = CalendarColors::Name ; \\
s = Substitute ( Lower ( s ) ; \\
["\"" ; "" ] ; \\
["(" ; "" ] ; \\
[")" ; "" ] ; \\
["+" ; "" ] ; \\
["-" ; "" ] ; \\
[">" ; "" ] ; \\
["<" ; "" ] ; \\
["=" ; "" ] ; \\
["&#8800;" ; "" ] ; \\
["&#8804;" ; "" ] ; \\
["&#8805;" ; "" ] ; \\
["&" ; "" ] ; \\
["^" ; "" ] ; \\
["/" ; "" ] ; \\
["*" ; "" ] ; \\
[" or " ; "" ] ; \\
[" and " ; "" ] ; \\
[" not " ; "" ] ; \\
[" xor " ; "" ] ; \\
[" if " ; "" ] ; \\
[";" ; "" ] \\
) ] ; \\
Evaluate ( "Let ( $$sc_Color" & s &" = " & CalendarColors::ColorRBGValue & " ; \"\" )" ) ) ] \\
# \\
Go to Portal Row [Select; Next; Exit after last]
--> # \\
End Loop \\
# \\
Go to Layout [original layout] \\
#

-> Make sure this script runs when your data file opens (note that if this script is set up to be triggered by "OnFirstWindowOpen" and your data file never actually opens in a window, these color settings won't be propagated).
(855) SEEDCODE
[email protected]
Follow us: