DayBackForFileMaker

Adding Fields

DayBackForFileMaker.AddingFields History

Hide minor edits - Show changes to output

May 19, 2023, at 04:23 PM by 192.88.134.15 -
Changed lines 20-21 from:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png
to:
%center% %width=440% https://archive.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png
Changed line 30 from:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png
to:
%center% %width=440% https://archive.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png
November 18, 2017, at 11:55 PM by 192.88.134.15 -
Changed lines 9-10 from:
%newwin% [[https://youtu.be/Ky9xeDs6I84]]
to:
%newwin% [[https://youtu.be/Ky9xeDs6I84]]
Changed line 30 from:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png
to:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png
October 12, 2017, at 02:54 PM by 192.88.134.15 -
Added lines 49-52:

!! Can I remove fields from the popover?

Removing fields is described [[EventPopovers | here]] under the heading "What Are My Options for Changing How the Popover Looks & Behaves?"
July 07, 2017, at 06:09 PM by 192.88.135.15 -
Changed line 48 from:
Yes. As of [[version history | version  10.0]] you can add [[additional fields]] to the popover. This is greta for folks with more complex events of for required fields that need to be filled in before an event can be created.
to:
Yes. As of [[version history | version  10.0]] you can add [[additional fields]] to the popover. This is great for folks with more complex events of for required fields that need to be filled in before an event can be created.
May 18, 2017, at 02:56 PM by 192.88.134.15 -
Added lines 45-48:

!! Can I add more fields to the popover?

Yes. As of [[version history | version  10.0]] you can add [[additional fields]] to the popover. This is greta for folks with more complex events of for required fields that need to be filled in before an event can be created.
April 11, 2017, at 06:32 PM by 192.88.134.15 -
April 11, 2017, at 04:27 PM by 192.88.134.15 -
Added lines 8-9:

%newwin% [[https://youtu.be/Ky9xeDs6I84]]
February 20, 2017, at 06:18 PM by KC Embrey - added #eventsummarycalc
Added line 13:
[[#eventsummarycalc]]
November 24, 2016, at 12:46 AM by KC Embrey - Updated summary separator instructions
Changed line 21 from:
-> Note that the separator between values is currently a pipe "|". You can change that by editing the field "DBk_WebViewerSource" (also in your events table) described in the next section.
to:
-> Note that the separator between values is currently a pipe "|". You can change that by editing the "Load Calendar Settings - On Startup" script and modifying the value under the section "# When showing events in one line or block..." to the separator of your choice.
August 07, 2016, at 10:37 PM by 192.88.134.15 -
Changed lines 45-46 from:
You can do this pretty easily on Mac, and it looks pretty cool. Here's an %newwin% [[https://www.seedcode.com/add-icons-to-dayback-calendar/
 | overview]]. We don't have a way to do this on Windows yet.
to:
You can do this pretty easily on Mac, and it looks pretty cool. Here's an %newwin% [[https://www.seedcode.com/add-icons-to-dayback-calendar/ | overview]]. We don't have a way to do this on Windows yet.
December 11, 2015, at 02:36 AM by 192.88.134.15 -
Added lines 42-46:

!! Can I add icons to the event, like a caution icon for urgent events?

You can do this pretty easily on Mac, and it looks pretty cool. Here's an %newwin% [[https://www.seedcode.com/add-icons-to-dayback-calendar/
 | overview]]. We don't have a way to do this on Windows yet.
June 30, 2015, at 02:23 PM by 142.4.217.187 -
Changed line 41 from:
--> Resource: this is the field that becomes a column on the calendar's "Resouce" view. Again, resources may be sales people, trucks, or barbershop chairs. If you have a resource that folks compete for in your business, this is where you map that. This is a very powerful way to look at your events (and to make sense of a dense calendar) so read up on resources [[resources | here]].
to:
--> Resource: this is the field that becomes a column on the calendar's "Resource" view. Again, resources may be sales people, trucks, or barbershop chairs. If you have a resource that folks compete for in your business, this is where you map that. This is a very powerful way to look at your events (and to make sense of a dense calendar) so read up on resources [[resources | here]].
Added lines 7-10:
Here's an overview of how to change some of the display attributes:

(:youtube Ky9xeDs6I84 width=500:)

Deleted lines 19-22:

-> Here is an overview of what changing this looks like:

%center% (:youtube Ky9xeDs6I84 width=440:)
Changed line 19 from:
(:youtube Ky9xeDs6I84 width=500:)
to:
%center% (:youtube Ky9xeDs6I84 width=440:)
Added lines 16-19:

-> Here is an overview of what changing this looks like:

(:youtube Ky9xeDs6I84 width=500:)
Added lines 6-7:

You can also send users to your own event's layout when they click on an event, instead of using our webviewer popovers. Learn more here: [[your own event layouts]].
Changed lines 11-12 from:
%center% https://www.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png
to:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png
Changed line 21 from:
%center% https://www.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png
to:
%center% %width=440% https://www.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png
Changed line 37 from:
! Changing fields per tab
to:
! Changing Fields Per Tab
Changed line 40 from:
-> Yes. The section above describes editing the field you created in your events table called "DBk_EventSummaryCalc". Instead of just listing fields there, you can include IF statements that change the value of your display depending on the calendar's modes (modes are what we call "views" like "week view"). For example, instead of this line...
to:
-> Yes! The section above describes editing the field you created in your events table called "DBk_EventSummaryCalc". Instead of just listing fields there, you can include IF statements that change the value of your display depending on the calendar's modes (modes are what we call "views" like "week view"). For example, instead of this line...
Changed lines 40-76 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. ;-)

'''1.''' Edit the script "Cast Events as Variables - Build Query" and find comment "Build Query 2". You'll be editing the first Set Variable line after this comment.

'''2.''' The calc for that Set Variable line contains a Let() statement in it and that Let sets a variable "f" (for "fields") to the list of fields we'll pull from your events table. That currently ends like this:

-> & "." & Quote ( $$sc_FieldForStatus )

Add the following right after the code above:

-> & If ( $$sc_Mode = "Month" ;  ", " & $sc_Alias & "." & "MyField" )

This adds the field "MyField" to the SQL Query results so you'll have access to it when it's time to draw the month view. Hard coding a literal field name like this isn't usually a great idea as this calc will break if you change the name of "MyField". But this is a fine way to go to just see this working. Once it is working you'll want to go back and replace "MyField" with  a custom function that quotes the field and removes the table name, effectively making the field name SQL safe. Kevin Frank has a great such function here: https://www.filemakerhacks.com/?p=4924

You can expand on this calc to include new fields for other modes as well. For your reference, here is a list of all the possible modes in the calendar and the views they represent: [[Modes In The Calendar]].

Note that if you have more than one source you'll want to expand this to include a different version of "MyField" or each source by using a case statement and a different field for each value of $sc_SourceNo.

'''3.''' Next edit the script "Read Event Summary by Number ( Number )" and edit the line right after the comment "Summary". Change the '''first line''' of the calc used from this:

-> Substitute ( GetValue ( $sc_Calendar ; 3 )  ;

To this:

-> Substitute ( GetValue ( $sc_Calendar ; If ( $$sc_Mode = "Month" ; 5 ; 3 ) )  ;
 
The numbers 5 and 2 here are the columns from our SQL results; since we put "MyField" after "Status", it's now the 5th column.

'''4.''' 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 removed times from displaying on the month view.

Enjoy!
to:
-> Yes. The section above describes editing the field you created in your events table called "DBk_EventSummaryCalc". Instead of just listing fields there, you can include IF statements that change the value of your display depending on the calendar's modes (modes are what we call "views" like "week view"). For example, instead of this line...

--> desc = Description ;  // your event's description or notes field

-> ...you could do this:

-->  desc = If( $$sc_Mode = "Day" ; Left ( Contacts::Notes ; 50 ) & "... " & Description ; Description ) ;  // your event's description or notes field

-> That would show the first 50 characters of any notes you have on the related contact on the Day view where you have a bit more horizontal room for each event.

-> For reference, you can find a list of possible values for the $$sc_Mode variable here: [[modes in the calendar]].
Added lines 34-35:

--> Resource: this is the field that becomes a column on the calendar's "Resouce" view. Again, resources may be sales people, trucks, or barbershop chairs. If you have a resource that folks compete for in your business, this is where you map that. This is a very powerful way to look at your events (and to make sense of a dense calendar) so read up on resources [[resources | here]].
Changed lines 13-20 from:
fafsbads






More [[https://www.seedcode.com/pmwiki/pmwiki.php?n=DayBackForFileMaker.MultiLineEvents |
here]].
to:
-> You can include as many fields here as you'd like, just know that the "deeper" looks among your relationships, the slower the calendar will be at retrieving this data from FileMaker. So if you only use fields from your events table, it will be pretty fast. If you include related fields it will slow down slightly but related fields are so useful everyone uses them (the contact's phone number in our example is a related field). If you include summary fields or summary calcs it can really slow down.

-> Note that the separator between values is currently a pipe "|". You can change that by editing the field "DBk_WebViewerSource" (also in your events table) described in the next section.

'''The event detail popover (what you see when you click on an event)'''

-> When you click on an event in the calendar, the fields you see there are determined in another field you added to your events table,  "DBk_WebViewerSource".

%center% https://www.seedcode.com/rootimages/stikipad/dayback/eventdetailpopover.png

-> This field has a specific list of fields it expects and editing this field's definition involves finding the best match for each possible field in your table. For example, you may not have events linked to contacts so you'd use something like

--> contactID = DBk_Unused ;

-> instead of

--> contactID = id_contact ;

-> "DBk_Unused" is another of the fields you added in when you integrated the calendar and you can use that for any attribute here where you don't have a corresponding value. The date and time fields are required, so are the summary and the "id" which should be the primary key of your table. You can use "DBk_Unused" for the others, but we recommend you consider including a few others...

--> Status: this is the field by which we color code your events. Now this may not be a "status", it could be a division with your company, or a process, but color coding by ''some'' field is cool. Note that the variable name will always read "status" in this calc. You can change the word "status" in the calendar's display by editing the [[translation]] file--which is easier than it sounds. =)
Changed line 11 from:
https://www.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png
to:
%center% https://www.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png
Changed lines 5-43 from:
Most of the formatting of how things look in the calendar is done on the "Calendar Source Data" layout where you specify which field 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).

When you integrated the calendar you created a field in your events table called "zscEventSummaryCalc". Edit the definition of that field to include additional fields in the calendar. More [[https://www.seedcode.com/pmwiki/pmwiki.php?n=DayBackForFileMaker.MultiLineEvents | here]].

You'll find some additional controls inside the script "Format Event Summary --- Edit the Style of the Event Text Here ---"

But on the Day 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 the 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.

'''Calendar Versions prior to v7'''

-> When you integrated the calendar you already created a relationship from CalendarRows to Sample events based on this field match:

-> CalendarEventUIDCalc_FirstValue = _id

-> Where  _id is the primary key (the unique ID) in your events table. This relationship is used on the gantt chart but will also allow you to add fields right from your events table to the daily view.

'''Calendar Versions > 7'''

-> In order to get access to the fields in your events table you'll need to make a new relationship. On the relationships tab of manage database, create a new instance of your events table named something like "SampleEventsDirect" (append "Direct" to the name of the table occurrence you're using for events). Link this to CalendarRows as shown below:

 %width=500px newwin% [[https://www.seedcode.com/rootimages/stikipad/pro12/SampleEventsDirect.png | https://www.seedcode.com/rootimages/stikipad/pro12/SampleEventsDirect.png]]

'''Continue: all versions'''

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 (versions prior to 7) in the original calendar file or from SampleEventsDirect (versions after 7) .

Next, add a Refresh Window step at the end of the script "Refresh Calendar..." using the the Flush Cached Join Results option. If you want the best possible performance you can wrap it in an "If" statement so this step only executes when $$sc_Mode = "Day Sched". Reason for this is that the "Flush..." part of this will undo some of the work FileMaker does storing cached data from the server, and on some networks you'll feel this as you need to fetch the data over again.

'''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 events' source tables-- if your primary keys are all prefixed, only one relationship will be "true" at a time, so you can stack fields from 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 redraw the calendar 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". Don't send any parameters to the script.
to:
You can show fields from your own table(s) in two places in the calendar: on the main calendar views (like Day, Week, and Month), and in the event detail popover (what you see when you click on an event).

'''Main calendar views (like Day, Week, Month, etc.)'''

-> When you integrated the calendar you created a field in your events table called "DBk_EventSummaryCalc". Edit the definition of that field to include additional fields in the calendar, even including fields from related records like contacts as we do in our Sample Events table.

https://www.seedcode.com/rootimages/stikipad/dayback/addfieldsphone.png

fafsbads






More [[https://www.seedcode.com/pmwiki/pmwiki.php?n=DayBackForFileMaker.MultiLineEvents | here]].
July 15, 2014, at 01:41 PM by 50.132.85.96 -
Changed lines 19-24 from:
When you integrated the calendar you already created a relationship from CalendarRows to Sample events based on this field match:

CalendarEventUIDCalc_FirstValue = _id

Where  _id is the primary key (the unique ID) in your events table. This relationship is used on the gantt chart but will also allow you to add fields right from your events table to the daily view.
to:
-> When you integrated the calendar you already created a relationship from CalendarRows to Sample events based on this field match:

-> CalendarEventUIDCalc_FirstValue = _id

-> Where  _id is the primary key (the unique ID) in your events table. This relationship is used on the gantt chart but will also allow you to add fields right from your events table to the daily view.
Changed lines 27-29 from:
In order to get access to the fields in your events table you'll need to make a new relationship. On the relationships tab of manage database, create a new instance of your events table named something like "SampleEventsDirect" (append "Direct" to the name of the table occurrence you're using for events). Link this to CalendarRows as shown below:

to:
-> In order to get access to the fields in your events table you'll need to make a new relationship. On the relationships tab of manage database, create a new instance of your events table named something like "SampleEventsDirect" (append "Direct" to the name of the table occurrence you're using for events). Link this to CalendarRows as shown below:

 %width=500px newwin% [[https://www.seedcode.com/rootimages/stikipad/pro12/SampleEventsDirect.png | https://www.seedcode.com/rootimages/stikipad/pro12/SampleEventsDirect.png]]
July 15, 2014, at 01:38 PM by 50.132.85.96 -
Added lines 17-18:
'''Calendar Versions prior to v7'''
Changed lines 25-33 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.
to:
'''Calendar Versions > 7'''

In order to get access to the fields in your events table you'll need to make a new relationship. On the relationships tab of manage database, create a new instance of your events table named something like "SampleEventsDirect" (append "Direct" to the name of the table occurrence you're using for events). Link this to CalendarRows as shown below:



'''Continue: all versions'''

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 (versions prior to 7) in the original calendar file or from SampleEventsDirect (versions after 7)
.
(855) SEEDCODE
[email protected]
Follow us: