Event Colors
DayBackForFileMaker.EventColors History
Hide minor edits - Show changes to output
Changed lines 17-18 from:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorslg.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
to:
%center% %newwin width=440px% [[https://archive.seedcode.com/rootimages/stikipad/dayback/statuscolorslg.png | https://archive.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
Changed line 21 from:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/assignstatuslg.png | https://www.seedcode.com/rootimages/stikipad/dayback/assignstatussm.png]]
to:
%center% %newwin width=440px% [[https://archive.seedcode.com/rootimages/stikipad/dayback/assignstatuslg.png | https://archive.seedcode.com/rootimages/stikipad/dayback/assignstatussm.png]]
October 16, 2019, at 08:54 PM
by - Fixed a link
Changed line 64 from:
Another option would be to add a second color to DayBack, and use that for the resource. You'll find a great example of this, along with the calc field and CSS required here: : https://www.seedcode.com/add-icons-colors…lemaker-calendar/ ‎
to:
Another option would be to add a second color to DayBack, and use that for the resource. You'll find a great example of this, along with the calc field and CSS required here: : https://www.seedcode.com/add-icons-colors-Filemaker-calendar/ ‎
Added lines 61-62:
Another option would be to add a second color to DayBack, and use that for the resource. You'll find a great example of this, along with the calc field and CSS required here: : https://www.seedcode.com/add-icons-colors…lemaker-calendar/ ‎
September 17, 2018, at 08:00 PM
by - Added note on rgb/rgba
Changed lines 88-94 from:
-> '''3.''' Finally make sure that any value lists of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in DayBack: the best way to do this is to base any value list on the name field in the "CalendarColors" table. This way if you assign a "status" outside the calendar you'll be using the same values as inside the calendar.
to:
-> '''3.''' Finally make sure that any value lists of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in DayBack: the best way to do this is to base any value list on the name field in the "CalendarColors" table. This way if you assign a "status" outside the calendar you'll be using the same values as inside the calendar.
-> '''4.''' If you've set color (rgb/rgba) values manually using the status sidebar, your CSS theme, or custom [[EventStyles | Event Styles]], make sure that your values have the correct number of parameters:
-->'''rgb()''' values require 3 parameters (red, green, blue)
-->'''rgba()''' values require 4 parameters (red, green, blue, alpha (opacity))
-> '''4.''' If you've set color (rgb/rgba) values manually using the status sidebar, your CSS theme, or custom [[EventStyles | Event Styles]], make sure that your values have the correct number of parameters:
-->'''rgb()''' values require 3 parameters (red, green, blue)
-->'''rgba()''' values require 4 parameters (red, green, blue, alpha (opacity))
Changed line 51 from:
Yes. A few different approaches are described [[https://www.seedcode.com/add-icons-to-dayback-calendar/ | here]].
to:
Yes. [[Version history | Version]] 10.16 introduced the ability to calculate event styles and add icons using CSS. Check it out: [[Event Styles]]. And a few different approaches are described [[https://www.seedcode.com/add-icons-to-dayback-calendar/ | here]].
Changed line 84 from:
--> And in the script "Load Calendar Settings - On Startup --- Edit Configuration Here ---" where line 92 specified the field you'll use when filtering by status. All three places should use the same field (though in the script here you can specify one field in each source).
to:
--> And in the script "Load Calendar Settings - On Startup --- Edit Configuration Here ---" where lines 100-106 specified the field you'll use when filtering by status (Look for the comment #Maps filters to fields). All three places should use the same field (though in the script here you can specify one field in each source).
Changed line 19 from:
In fact, these *are* a value list in that there's a "CalendarColors" table in DayBack where each of these status filters isa color. Adding and removing status filters here in the calendar is manipulating records in this "CalendarColors" table. The value list you use for status in your FileMaker layout should be based on the records in this table. That way you can assign statuses to events in your own layouts and in the calendar.
to:
In fact, these *are* a value list in that there's a "CalendarColors" table in DayBack where each of these status filters is a color. Adding and removing status filters here in the calendar is manipulating records in this "CalendarColors" table. The value list you use for status in your FileMaker layout should be based on the records in this table. That way you can assign statuses to events in your own layouts and in the calendar.
September 25, 2017, at 10:20 PM
by - Mentioned the correct script for source colors
Changed line 63 from:
Yes! As of build 9.72 of DayBack, you can assign a default color for each calendar source within the "Load Calendar Settings at Startup" script.
to:
Yes! As of build 9.72 of DayBack, you can assign a default color for each calendar source within the "Load Source Settings at Startup --- Describe Your Sources Here ---" script.
November 03, 2016, at 04:39 PM
by - Added note on status color affecting text color.
Added lines 37-38:
-> '''''Important Note on Status Colors:''''' The color of the event status influences the event text color. If the Green and Blue values (GB in RGBA) are both above 100, the color of your text will be black. If either Green or Blue value is below 100, the color of your text will be white.
November 03, 2016, at 04:09 PM
by - Fixed StatusColors anchor and heading
Changed lines 23-24 from:
[[#StatusColors]]!! Adjusting Status Colors
to:
[[#StatusColors]]
!! Adjusting Status Colors
!! Adjusting Status Colors
November 03, 2016, at 04:08 PM
by - Added StatusColors Anchor
Changed line 23 from:
!! Adjusting Status Colors
to:
[[#StatusColors]]!! Adjusting Status Colors
November 03, 2016, at 03:52 PM
by - Updating location of "New Status +" button
Changed line 27 from:
-> Click the "+" button above the list of status filters to make a new one (and a new record in the "CalendarColors" table.) Your cursor will be in the name field.
to:
-> Click the "New Status +" button below the list of status filters to make a new one (and a new record in the "CalendarColors" table.) Your cursor will be in the name field.
Changed lines 75-76 from:
--> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
to:
--> And in the script "Load Calendar Settings - On Startup --- Edit Configuration Here ---" where line 92 specified the field you'll use when filtering by status. All three places should use the same field (though in the script here you can specify one field in each source).
Changed line 79 from:
-> '''3.''' Finally make sure the any value lists of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in DayBack: the best way to do this is to base any value list on the name field in the "CalendarColors" table. This way if you assign a "status" outside the calendar you'll be using the same values as inside the calendar.
to:
-> '''3.''' Finally make sure that any value lists of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in DayBack: the best way to do this is to base any value list on the name field in the "CalendarColors" table. This way if you assign a "status" outside the calendar you'll be using the same values as inside the calendar.
Changed line 57 from:
If you'd still like to set the source color as an option in the Status Filters list, you can create a new calc field in each source table set to "Source Name" of your source. Then follow the instructions in the video above for color-coding by a calculated field.
to:
If you'd still like to set the source color as an option in the Status Filters list, you can create a new calc field in each source table set to "Source Name" of your source. Then follow the instructions in the video above to color-code by this calculation field instead of a status field.
Changed line 53 from:
!! Can I color code by Source instead of by a field?
to:
!! Can I color code by calendar Source?
July 15, 2016, at 06:32 PM
by - Color by Resource
Changed lines 11-12 from:
Setting up color coding begins in the "DBk_WebViewerSource" field you added to your events table when when [[integration | integrating]] the calendar. The field you mapped to "status" there is the field DayBack looks at to color code your events. You'll also see a "color" field on the Source No X layout (Source No 1, Source No 2, etc.) you used . That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding: this should be '''the same''' field you mapped to "status" in "DBk_WebViewerSource".
to:
Setting up color coding begins in the "DBk_WebViewerSource" field you added to your events table when [[integration | integrating]] the calendar. The field you mapped to "status" there is the field DayBack looks at to color code your events. You'll also see a "color" field on the Source No X layout (Source No 1, Source No 2, etc.) you used . That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding: this should be '''the same''' field you mapped to "status" in "DBk_WebViewerSource".
Changed lines 37-38 from:
!! Can I Based My Event Colors on a Calculated Field?
to:
!! Can I Base My Event Colors on a Calculated Field?
Added lines 47-52:
!! Can I color events by Resource?
Sure thing. Although DayBack's Resource views help organize your events by resource, you may still want to set event colors based on the Resource assigned. Note that if you have multiple Resources selected, the event will be color-coded by the *first selected* Resource.
In the DBk_WebViewerSource field, map your Resource field to both sc_resource and sc_status. On the Source No _ layout, map the Resource field to both the resource and status placeholders. If you are using DayBack's built-in event popover, you will likely want to hide the "Status" item from appearing on the popover, since it will contain the same data as the Resource item. You can do this by modifying the $$sc_HidePopoverItems Set Variable step in the "Load Source Settings at Startup" script. Lastly, change/add entries in the Status Filters list on the calendar to assign a color for each of your Resources. That's it!
Sure thing. Although DayBack's Resource views help organize your events by resource, you may still want to set event colors based on the Resource assigned. Note that if you have multiple Resources selected, the event will be color-coded by the *first selected* Resource.
In the DBk_WebViewerSource field, map your Resource field to both sc_resource and sc_status. On the Source No _ layout, map the Resource field to both the resource and status placeholders. If you are using DayBack's built-in event popover, you will likely want to hide the "Status" item from appearing on the popover, since it will contain the same data as the Resource item. You can do this by modifying the $$sc_HidePopoverItems Set Variable step in the "Load Source Settings at Startup" script. Lastly, change/add entries in the Status Filters list on the calendar to assign a color for each of your Resources. That's it!
Changed lines 55-57 from:
Yes. If you aren't using the "Status" field in your source table(s), change it to a calc field that returns the name of the source (e.g., "Sample Events"). Make sure the result type for the calc is Text.
If you are using the Status field, make a different calc field for the source. Then, map the field object on the "Colors" tab on the "Source No X" layouts to this new field, and also map the sc_status variable in the "DBk_WebViewerSource" calculation field to this new field. You'll also need need to edit the "Create Edit Delete Event..." script as described in the video above, so that the calendar does not attempt to write to this calculation field. Note that, if you are using DayBack's event popover instead of your own FileMaker layout, your original "Status" field will not be available on the event popover with this modification.
If you are using the Status field, make a different calc field for the source. Then, map the field object on the "Colors" tab on
to:
Yes! As of build 9.72 of DayBack, you can assign a default color for each calendar source within the "Load Calendar Settings at Startup" script.
If you'd still like to set the source color as an option in the Status Filters list, you can create a new calc field in each source table set to "Source Name" of your source. Then follow the instructions in the video above for color-coding by a calculated field.
If you'd still like to set the source color as an option in the Status Filters list, you can create a new calc field in each source table set to "Source Name" of your source. Then follow the instructions in the video above for color-coding by a calculated field.
Added lines 6-7:
As of [[Version History | version]] 9.71 you can also give each calendar [[multiple sources | source]] a default color. Events in this source will take this color until a status color overrides it; more on status colors below.
January 29, 2016, at 05:41 PM
by - Edited "Can I color code by Source..." section; added note about DBk_WebViewerSource calc.
Changed lines 47-49 from:
Yes. If you aren't using the "Status" field in your source table(s), change it to a calc field that returns the name of the source (e.g., "Sample Events"). Make sure the result type for the calc is Text. If you are using the Status field, make a different calc field for the source, then just map the field object on the "Colors" tab on the "Source No X" layouts to that new field.
to:
Yes. If you aren't using the "Status" field in your source table(s), change it to a calc field that returns the name of the source (e.g., "Sample Events"). Make sure the result type for the calc is Text.
If you are using the Status field, make a different calc field for the source. Then, map the field object on the "Colors" tab on the "Source No X" layouts to this new field, and also map the sc_status variable in the "DBk_WebViewerSource" calculation field to this new field. You'll also need need to edit the "Create Edit Delete Event..." script as described in the video above, so that the calendar does not attempt to write to this calculation field. Note that, if you are using DayBack's event popover instead of your own FileMaker layout, your original "Status" field will not be available on the event popover with this modification.
If you are using the Status field, make a different calc field for the source. Then, map the field object on the "Colors" tab on the "Source No X" layouts to this new field, and also map the sc_status variable in the "DBk_WebViewerSource" calculation field to this new field. You'll also need need to edit the "Create Edit Delete Event..." script as described in the video above, so that the calendar does not attempt to write to this calculation field. Note that, if you are using DayBack's event popover instead of your own FileMaker layout, your original "Status" field will not be available on the event popover with this modification.
Added lines 32-33:
-> You can manage these colors in FileMaker as well: head over to the "Calendar Status Colors" layout and you'll see a list of these colors records and their sort value: change the sort value to re-order them and then run the solution's "Upon Opening" script to see your changes take effect.
Added lines 38-41:
!! Can I add colored icons in addition to coloring the event?
Yes. A few different approaches are described [[https://www.seedcode.com/add-icons-to-dayback-calendar/ | here]].
Changed line 37 from:
(:youtube h-hQsCWIOm8 width=500:)
to:
%center% (:youtube h-hQsCWIOm8 width=440:)
Added lines 32-37:
!! Can I Based My Event Colors on a Calculated Field?
Sure. You'll just want to change a couple changes to facilitate this. The following video shows what to do:
(:youtube h-hQsCWIOm8 width=500:)
Changed lines 47-53 from:
-> It needs to be mapped on the colors tab of the Source No X layout.
-> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
-> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
-> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
-> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
-> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
-> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
to:
--> It needs to be mapped on the colors tab of the Source No X layout.
--> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
--> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
--> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
--> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
--> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
--> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
Deleted lines 6-15:
-> It needs to be mapped on the colors tab of the Source No X layout.
-> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
-> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
-> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
Changed lines 45-53 from:
-> '''1.''' Make sure that the field you use for color mapping on the Source No X layout, and the field you use in SampleEvents::DBk_ColorCalc are the same fields.
to:
-> '''1.''' Make sure that the field you use for color mapping on the Source No X layout, and the field you use in SampleEvents::DBk_ColorCalc are the same fields. In order for color coding to work, four things need to be true about the fields you've decided to base your color coding upon:
-> It needs to be mapped on the colors tab of the Source No X layout.
-> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
-> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
-> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
-> It needs to be mapped on the colors tab of the Source No X layout.
-> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
-> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
-> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
Added lines 6-17:
In order for color coding to work, four things need to be true about the fields you've decided to base your color coding upon:
-> It needs to be mapped on the colors tab of the Source No X layout.
-> You use that field in your colors calc: the field SampleEvents::DBk_ColorCalc.
-> You've mapped your field to the label "status" in the field SampleEvents::DBk_WebViewerSource
-> And the value in your field is one of the values of the Status Filters shown on the "Filters" tab of the calendar/
!! The Details
Changed line 7 from:
Setting up color coding begins on the Source No X layout (Source No 1, Source No 2, etc.) you used when [[integration | integrating]] the calendar. That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding.
to:
Setting up color coding begins in the "DBk_WebViewerSource" field you added to your events table when when [[integration | integrating]] the calendar. The field you mapped to "status" there is the field DayBack looks at to color code your events. You'll also see a "color" field on the Source No X layout (Source No 1, Source No 2, etc.) you used . That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding: this should be '''the same''' field you mapped to "status" in "DBk_WebViewerSource".
Changed lines 21-24 from:
->
to:
Here are some tips for creating and adjusting status colors.
-> Click the "+" button above the list of status filters to make a new one (and a new record in the "CalendarColors" table.) Your cursor will be in the name field.
-> Select the color you'd like by manipulating the color picker. It consists of three columns. The left, and widest, lets you fine-tune the color. The middle column lets you pick the general color spectrum, and the third column adjusts the transparency.
-> Click the "+" button above the list of status filters to make a new one (and a new record in the "CalendarColors" table.) Your cursor will be in the name field.
-> Select the color you'd like by manipulating the color picker. It consists of three columns. The left, and widest, lets you fine-tune the color. The middle column lets you pick the general color spectrum, and the third column adjusts the transparency.
Changed lines 29-30 from:
-> You can easily alter the pallets of possible colors by editing the field definition for the field "CalendarInterface::ColorRGBValues" where the RGB values of each pallet are declared.
to:
-> Click on the gear icon beside an existing color to edit or delete it. Note that deleting or renaming a color here doesn't change the value of that field in any events that may be using that status/color.
Deleted lines 38-47:
Yes. The simple day view (go to Settings / click "Use simple...") uses a different display for colors so that the color doesn't fill the whole event.
%center% %width=440px% https://www.seedcode.com/rootimages/stikipad/pro12/trianglecolor.jpg
If you want to use this display on other views, edit the calc CalendarColorReptCalc in the calendar rows table. The second line of this calc sets "objecto" to use our triangle display only when the mode is "Day" (our simple day mode). Edit this line to use the triangle in any other modes you'd like. For your reference, a list of possible modes can be found [[ModesInTheCalendar | here]].
You may also want to change the font size of the value "display" at the end of this calc just on the week and month views if you switch them to the triangle display. You'll see an example line there commented out which does this for you.
Changed lines 43-55 from:
->
->
->
-> '''4.''' Still not working? Try running the script "Load Calendar Graphics - alternate".
-> '''5.''' Finally make sure the value list of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in the Assign Colors layout.
-> '''6.''' If you see a black bar instead of your color, it is likely that you have operators (math symbols or FileMaker expressions) in the color name (the event status). We try to trap for most of these but there are a lot of possible combinations. Try different versions of your status name without the operators. Remember you need to change this in the event itself, in the status value list, and in the "assign colors" screen in settings
to:
-> '''1.''' Make sure that the field you use for color mapping on the Source No X layout, and the field you use in SampleEvents::DBk_ColorCalc are the same fields.
-> '''2.''' Make sure the values in the field you've mapped to color is a value in the list of Status Filters in the calendars sidebar.
-> '''3.''' Finally make sure the any value lists of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in DayBack: the best way to do this is to base any value list on the name field in the "CalendarColors" table. This way if you assign a "status" outside the calendar you'll be using the same values as inside the calendar.
-> '''2.''' Make sure the values in the field you've mapped to color is a value in the list of Status Filters in the calendars sidebar.
-> '''3.''' Finally make sure the any value lists of possible statuses (or whatever value list you're using as possible values for ''your'' color coded field) matches the list of values shown in DayBack: the best way to do this is to base any value list on the name field in the "CalendarColors" table. This way if you assign a "status" outside the calendar you'll be using the same values as inside the calendar.
Changed line 17 from:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/assignstatussm.png | https://www.seedcode.com/rootimages/stikipad/dayback/assignstatuslg.png]]
to:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/assignstatuslg.png | https://www.seedcode.com/rootimages/stikipad/dayback/assignstatussm.png]]
Changed line 13 from:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
to:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorslg.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
Added lines 13-14:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
Changed lines 17-20 from:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
'''A few notes about how this works...'''
to:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/assignstatussm.png | https://www.seedcode.com/rootimages/stikipad/dayback/assignstatuslg.png]]
!! Adjusting Status Colors
!! Adjusting Status Colors
Changed line 25 from:
-> You can '''override the color''' of any status by simply typing a new RGB value into each row.
to:
-> If you have colors you'd like to match exactly, simply type the RGBA value in right below the color picker. (The "A" in RGBA is alpha, or transparency, so just enter 1 if you're trying to match colors exactly.)
Changed line 13 from:
In fact, these *are* a value list in that there's a "CalendaeColors" table in DayBack where each of these status filters isa color. Adding and removing status filters here in the calendar is manipulating records in this "CalendaeColors" table.
to:
In fact, these *are* a value list in that there's a "CalendarColors" table in DayBack where each of these status filters isa color. Adding and removing status filters here in the calendar is manipulating records in this "CalendarColors" table. The value list you use for status in your FileMaker layout should be based on the records in this table. That way you can assign statuses to events in your own layouts and in the calendar.
Changed line 15 from:
%center% %newwin width=500px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
to:
%center% %newwin width=440px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
Changed line 9 from:
to:
Note that there's also a color field in the events table so we can show a color beside the event on the Event List and Event Details layouts. This calc (SampleEvents::DBk_ColorCalc) begins with a Let() statement were you can specify which field is being used for your colors.
Changed lines 3-14 from:
The calendar colors events based on the contents of a field of your choosing. We call this field the event "status" in the documentation and sample file, but you can use any field you'd like.
Setting up color coding begins on the Source No X layout (Source No 1, Source No 2, etc.) you made when [[integration | integrating]]the calendar. That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding.
-> (Note: We also have a color field in the events table so we can show a color beside the event on the Event List and Event Details layouts. This calc (SampleEvents::z_sc_ColorCalc) begins with a Let() statement were you can specify which field is being used for your colors.)
Then, on the Settings tab of the calendar you'll see a button called "assign colors". Click that and you can drag a color into each one of your "status" values.
%center% %width=500px% https://www.seedcode.com/rootimages/stikipad/pro12/assigncolors.png
A few notes about how this works...
Setting up color coding begins on the Source No X layout (Source No 1, Source No 2, etc.) you made when [[integration | integrating]]
-> (Note: We also have a color field in the events table so we can show a color beside the event on the Event List and Event Details layouts. This calc (SampleEvents::z_sc_ColorCalc) begins with a Let() statement were you can specify which field is being used for your colors
Then, on the Settings tab of the calendar you'll see a button called "assign colors". Click that and you can drag a color into each one of your "status" values
%center% %width=500px% https
A few notes about how this works
to:
The calendar colors events based on the contents of a field of your choosing. We call this field the event "status" in the documentation and sample file, but you can use any field you'd like and [[translation | translate]] the interface to call it something else: "department", "category", "state".
''We do suggest using this for something temporal about the event (like its confirmation status) and use [[resources]] for more concrete facts about the event like where it is or whose it is.''
Setting up color coding begins on the Source No X layout (Source No 1, Source No 2, etc.) you used when [[integration | integrating]] the calendar. That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding.
-> (Note: We also have a color field in the events table so we can show a color beside the event on the Event List and Event Details layouts. This calc (SampleEvents::DBk_ColorCalc) begins with a Let() statement were you can specify which field is being used for your colors.)
Then, on the Filters tab of the calendar you'll see a list of the calendar's "statuses". These should be the possible values of the field you mapped to status: think of these like a value list for that field.
In fact, these *are* a value list in that there's a "CalendaeColors" table in DayBack where each of these status filters isa color. Adding and removing status filters here in the calendar is manipulating records in this "CalendaeColors" table.
%center% %newwin width=500px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
'''A few notes about how this works...'''
''We do suggest using this for something temporal about the event (like its confirmation status) and use [[resources]] for more concrete facts about the event like where it is or whose it is.''
Setting up color coding begins on the Source No X layout (Source No 1, Source No 2, etc.) you used when [[integration | integrating]] the calendar. That layout has a tab called "colors" on which you can specify the field you'd like to use for color coding.
-> (Note: We also have a color field in the events table so we can show a color beside the event on the Event List and Event Details layouts. This calc (SampleEvents::DBk_ColorCalc) begins with a Let() statement were you can specify which field is being used for your colors.)
Then, on the Filters tab of the calendar you'll see a list of the calendar's "statuses". These should be the possible values of the field you mapped to status: think of these like a value list for that field.
In fact, these *are* a value list in that there's a "CalendaeColors" table in DayBack where each of these status filters isa color. Adding and removing status filters here in the calendar is manipulating records in this "CalendaeColors" table.
%center% %newwin width=500px% [[https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png | https://www.seedcode.com/rootimages/stikipad/dayback/statuscolorssm.png]]
'''A few notes about how this works...'''
Added lines 45-46:
(Note that colors were fundamentally reworked in [[version history | version]] 7.23 and are much more stable now as they don't depend on fonts, check out the [[version history]] notes for instructions on upgrading to the new build.)
Changed line 26 from:
Yes. Toward the end of the "Load Calendar Settings - On Startup..." script, set the $$sc_ColorCodeBySource variable to "1". Then change the values entered on the "Assign Colors" layout to match the names of your sources. Use the source names exactly as they are being set into the $$sc_SourceName[X] variable in the "Load Source Settings at Startup --- Describe Your Sources Here" script (e.g., "Sample Events").
to:
Yes. If you aren't using the "Status" field in your source table(s), change it to a calc field that returns the name of the source (e.g., "Sample Events"). Make sure the result type for the calc is Text. If you are using the Status field, make a different calc field for the source, then just map the field object on the "Colors" tab on the "Source No X" layouts to that new field.
Changed line 26 from:
Yes. Toward the end of the "Load Calendar Settings - On Startup..." script, set the $$sc_ColorCodeBySource variable to "1". Then change the values entered on the "Assign Colors" layout to match the names of your sources. Use the source names that are being set into the $$sc_SourceName[X] variable in the "Load Source Settings at Startup --- Describe Your Sources Here" script (e.g., "Sample Events").
to:
Yes. Toward the end of the "Load Calendar Settings - On Startup..." script, set the $$sc_ColorCodeBySource variable to "1". Then change the values entered on the "Assign Colors" layout to match the names of your sources. Use the source names exactly as they are being set into the $$sc_SourceName[X] variable in the "Load Source Settings at Startup --- Describe Your Sources Here" script (e.g., "Sample Events").
Changed line 26 from:
Yes. Toward the end of the script "Load Calendar Settings - On Startup..." you'll see a setting for this: set that to "1". Then change the names entered for the "statuses" in the screen above to be the names of your sources. Use the same names you're using on the first tab on your Source No X layout.
to:
Yes. Toward the end of the "Load Calendar Settings - On Startup..." script, set the $$sc_ColorCodeBySource variable to "1". Then change the values entered on the "Assign Colors" layout to match the names of your sources. Use the source names that are being set into the $$sc_SourceName[X] variable in the "Load Source Settings at Startup --- Describe Your Sources Here" script (e.g., "Sample Events").