Page 1 of 1

Add fields to the Calendar Day View

PostPosted: Sun Oct 21, 2012 8:08 pm
by malcolm
SeedCode Calendar Pro build 5.6

The documentation for the calendar says "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 Flush Cached Join Results option".

I have followed these instructions.

The first thing I notice is that the script step is already using the flush cache join results option.

The second thing I notice is that the data appears to be OK when I first add a new appointment but as soon as I move to another day the data has not moved. For example, if the 11am slot showed "XYZ" when I move to another day the 11am slot continues to show "XYZ".
Data-Lag.gif
This image shows the data from one day sitting in the same spot, regardless of the day
Data-Lag.gif (15.06 KiB) Viewed 6993 times


Presuming that I had done something wrong I opened a brand new copy of the calendar and make the changes. In this case the fields do not display any data, despite having data there.

comparison.gif
This image shows two windows in layout mode and the same two windows in browse mode. The edit window shows the correct data. The same fields placed onto the calendar Day tab do not show any data.
comparison.gif (94.93 KiB) Viewed 7000 times

Re: Add fields to the Calendar Day View

PostPosted: Mon Oct 22, 2012 9:06 am
by JasonYoung
Hi Malcom,

I'll need to check the docs on that version, but it looks like they might not have been updated correctly. The Refresh script step in the stock version of 5.6 is set only to run for the Gantt chart and does not get called in day view. That's why the fields from SampleEvents aren't getting flushed. The If calculation there should be updated to run for the Gantt and for day view, i.e.

PatternCount ( $$sc_Mode ; "Gantt" )
or
PatternCount ( $$sc_Mode ; "Day" )

like this:
Refresh.png
Refresh.png (128.1 KiB) Viewed 6997 times


That should fix it, but let me know if it's still giving you trouble.
-Jason

Re: Add fields to the Calendar Day View

PostPosted: Mon Oct 22, 2012 7:15 pm
by malcolm
That resolves the problem with the data hanging around. However, now there is nothing displayed at all.

The attached images show that there is a field from a related table place into the layout. I want to use fields rather than the z_c_alternate_summary because I want to have regular columns of data.

layout.gif
I've place a field from the SampleEvents table into the portal.
layout.gif (22.17 KiB) Viewed 6994 times


The next image is just a sanity check. The event is on the right day, the right time, the right person and we can see a bit of data in the event detail view.
Detail.gif
you can see a bit of data in the summary field in this view
Detail.gif (9.64 KiB) Viewed 6993 times


The problem is that the extra data that I want to appear is not being displayed. I'd rather like to see that information here.
browse.gif
The summary field data isn't visible here
browse.gif (6 KiB) Viewed 6993 times

Re: Add fields to the Calendar Day View

PostPosted: Tue Oct 23, 2012 7:31 am
by JasonYoung
Hi Malcolm,

The relationship between CalendarRows and Sample Events is by

CalendarRows::CalendarEventUIDCalc_FirstValue = SampleEvents::_id

So we should make sure that CalendarRows::CalendarEventUIDCalc_FirstValue is correct and that the relationship to sample events is correct. I do this by putting the portal row into focus and and checking the following two fields in the data viewer.

Calendar.png
Calendar.png (46.93 KiB) Viewed 6992 times


If they're both populated/correct, then it's probably just a field alignment issue on the portal. Otherwise, we check either the calc field in CalendarRows is not right or the relationship. Can you tell me if both are populated like the above image?

Thanks!

Re: Add fields to the Calendar Day View

PostPosted: Wed Oct 24, 2012 2:57 am
by malcolm
CalendarRows::CalendarEventUIDCalc_FirstValue does contain a value.
SampleEvents::Summary is empty

There is an event which has that ID and the summary field has a value

Re: Add fields to the Calendar Day View

PostPosted: Wed Oct 24, 2012 7:13 am
by JasonYoung
Thanks Malcolm,

Then there's something wrong with the relationship between CalendarRows and SampleEvents which should look like this.

Graph.png
Graph.png (76 KiB) Viewed 6984 times


If you're still having trouble, I can take a look at your file and see if I can tell what's happening there. If you'd like to send to me, then please contact me at [email protected] and we'll set that up.

Thanks!

Re: Add fields to the Calendar Day View

PostPosted: Wed Oct 24, 2012 1:12 pm
by malcolm
I'm seeing what you're seeing in the screen shot.
I'll flick through a link to the file under the subject line: Malcolm's Wonky Calendar