Heathbo Posted September 17, 2007 Posted September 17, 2007 I know there has been many post on something similiar to this, but I haven't found anything current. Here is what I'm dealing with. I have a layout with a month calendar in it. I've already written scripts to show the appropriate day numbers according to the month were veiwing. Here is the problem, I have another table that holds all the call logs. I want to show in the calendar view the total number (the sum) of all the incoming calls on that peticular day in the calendar. For example, the calendar shows all the days of the month of March. In the March 2nd box I want to see an number that represents the total number of incoming calls (from the call logs) on March 2nd. My question is, do I have to create a table for each and every square (42=7days * 6 weeks) that a day number can go into? I know I can do this with a script. The problem is that a script isn't live. Any thoughts?
Tori Mitchell Posted September 17, 2007 Posted September 17, 2007 In general, calendaring solutions are often done with calculations. If you're doing that and have the layout setup correctly for the display, the cells of the calendar should be relatable to a date. Unfortunately, if you don't have the calendar view setup with calcs and instead are using scripts to create a static array, you'll likely have a bit more trouble with this kind of solution.
Heathbo Posted September 17, 2007 Author Posted September 17, 2007 I originally started with a calc for each box. I switched gears when the calculations for each box started slowing down the database. I figured since scripts only happen when triggered it wouldn't slow the system down. The other reason I switched gears is with a calc solution it seemed I would need a TO for each box in the month(42).
aholtzapfel Posted September 17, 2007 Posted September 17, 2007 You might want to take a look at the calender by SeedCode.com (should be a link at top of all FMforums web pages) They have a nice calender and if nothing else, it might be usefull to look at how they do this. (they should have free unlocked versions you can look at.)
Tori Mitchell Posted September 18, 2007 Posted September 18, 2007 Here's one from JMO that's really about good enough for most solutions: http://www.databasepros.com/calendar.html It's open so you can look at how it ticks.
Heathbo Posted September 18, 2007 Author Posted September 18, 2007 Unfortunately they only provide a complete solution. I need a version that I can open up and see how its put together. Were on a small budget so buying something to suplement what I'm working on is not an option.
Heathbo Posted September 18, 2007 Author Posted September 18, 2007 SeedCode.com verison is nice but maybe a little overkill for what I need.
Lee Smith Posted September 18, 2007 Posted September 18, 2007 Then search the Sample Files here for Calendar. Lee
Søren Dyhr Posted September 18, 2007 Posted September 18, 2007 (edited) You do not need 42 TO's for this solution: http://fmforums.com/forum/showtopic.php?tid/176396/post/204083/hl//fromsearch/1/ ...5-6 is more likely, and is BTW the solution behind Mike Gamble's advice! Just for the hell of it, try to compare the rendering of your suggested 42 and then what's done in that thread! --sd Callendar is a small town in the center of Scotland, where it rains every quater of the hour ... so the view must be quite blurred! Edited September 18, 2007 by Guest
Heathbo Posted September 18, 2007 Author Posted September 18, 2007 Hey all, thanks a ton. The advice and solutions you provided has saved me a ton of work. Mike Gamble, you were right. The best calendar sollution does use calculations. I'm amazed at how complicated I was making it. Thanks again.
Heathbo Posted September 18, 2007 Author Posted September 18, 2007 Ok, to through a wrench into the works. How would I go about it if I needed a sum value rather than appointments in each day of the calendar. Each record I'm pulling the sums from only has two values(InComing and OutGoing).
Søren Dyhr Posted September 19, 2007 Posted September 19, 2007 I have in my version of the approach: http://fmforums.com/forum/attachment.php?attid/7281/ ...a special home-knitted aggregate function called "SinceWeAreInAPortal" to overcome the problem with a portal inside a portal, which easily could be exchanged with another much simpler - say Sum( which in your case perhaps should be two of them, one for InComming and one for OutGoing. My table event could obviously be eased from a lot of it's fields, since the issue it solves is recurring events booking. Now you could perhaps implement some of the shenanigans I use in this thread: http://fmforums.com/forum/showpost.php?post/266573/ ...because each record shouldn't have two fields where one is empty and the other holds a value, the proper structure is avoid null values, although Filemaker's aggregate functions deals with such in a spreadsheet'ish metaphor. Other tools gives wrong results with attempts to make calculation with NULL... --sd
Recommended Posts
This topic is 6274 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now