This topic contains 8 replies, has 2 voices, and was last updated by  admin 8 years, 3 months ago.

  • Author
    Posts
  • #71440

    Alberto1960
    Member

    I’ve got a project in process, and demo’d the calendar to the client. He has a bunch of technicians who go out to do service calls. So far, things are based on an Appointment table, but he doesn’t set appointments with time; he just tries to group them by county on any given day, and then will be trying to “route optimize” them via a mapping package.

    So if he’s got 10 Orange appointments and 12 Putnam appointments on a single day, he doesn’t want to see 22 boxes. He just wants to see two calendar items for the day, “Orange 10” and “Putnam 12,” or something like that. Then, clicking on the item, he’d like to see a list (I’m sure list or portal would do) of the specific appointments, and be able to click on one of those rows to see the appointment detail.

    We already have a table of counties, as we’re using that for tax lookups. And I’m guessing I could make some sort of join table (county and date) for records that would give him the above. I think the easiest way to do that sort of thing would be to run a server-side script to create all those records, but I’m not sure that’s the best way to go. He doesn’t need every county every day, because he USUALLY sticks to certain counties on certain days of the week.

    I haven’t played with resources and don’t know if that would help either. Would that be helpful, or is there another approach you’d recommend?

    TIA,

  • #71441

    admin
    Keymaster

    Hi Ziggy –

    Thanks for the question.

    It looks like your approach makes the most sense for the strategy you’re using to schedule appointments. I don’t know you necessarily need a server-side script to create records for you, but having a join table (county, date) makes the most sense for drawing the calendar.

    Then when you double click, you’d have a window showing a portal with the individual records in it.

    I don’t know if you’ve taken a look at our new map view. It lets you see all your appointments for any given time period (day, week, month, etc.) on a Google map. It may help you visualize individual appointments by area.

    A nice thing about soSIMPLE Calendar, is that you can quickly put together multiple calendars for multiple purposes. So you might have one that is a summary view by county, and another that’s more detailed, so can see individuals within a county.

    BTW – are you in Rockland county, too? We have an office there.

    Best,

    Ken

  • #71442

    Alberto1960
    Member

    Thanks, Ken.

    So now I’m making “Daily” records that each have a date and a key for the related county. I’m working with just a batch of those for now; I’ll probably run a server-side script that creates a month’s worth at a time, and deletes out-of-date ones, to automate that part and to clean out data we no longer need to see.

    I’ve set a new Data Source to the Daily table, and that part is OK, but, of course, I’m seeing too many events on each calendar day to be of much use. I looked at the instructions on filtering and have tried two approaches, neither of which is working properly.

    I think the simplest way is using the “Show only records” option in the Data Source. I created a field that calculates to 1 if the Daily record has ≥ 1 appointments, and if it’s in the right region for the branch office (using a global field) I want to focus on. The calc is clearly working, as records are showing 1 or 0 for it. I’ve specified the field in the Data Source settings and I’ve added it to the layout with all the other critical Daily fields. But now I’m not seeing any events.

    I tried regenerating the web viewer for the above, but it shows exactly the same calc as the older web viewer, and didn’t make a difference.

    I also tried appending the &ShowOnCal=1 to the URL, but I’m not getting any filtering with that method.

    Most of the appointments are scheduled for today, and I’ve added start and end times, just to make sure they’re not hiding in the early morning or late night time slots when I’ve set the calendar to show only 8-6.

    Any suggestions what to try next? I’m hoping to demo this Wednesday after lunch.

    Thanks,
    debi

  • #71443

    admin
    Keymaster

    Hi Debi!

    So the issue you’re having is that the calendar doesn’t know the settings of the global field.

    The global field is only for the current user in FileMaker. The events are searched directly from the server. So whatever you set the global field to in your current session, will not carry through to determine what events show on the calendar.

    So what I would do is this:
    – set the field called “ShowOnCal” to calculate to 1 when Daily record has ≥ 1 appointments.
    – setup the data source to Only Show Records based on ShowOnCal.
    – That will filter to show only valid daily records, but will show all offices.

    Then:
    – set the global field ( e.g. “selectedOffice.g” ) to the name of the office you want to show
    – assuming the you have a field in the Daily record with the name of the office (e.g. “office”)…
    – add this to the end of the url: "&office=" & selectedOffice.g
    – this will append the global field as a filter to the events to only show the correct office.
    – this filter happens on top of the already filtered daily records.

    Let me know how that works.

    Best,

    Ken

  • #71444

    Alberto1960
    Member

    Ken,

    Thanks for the quick response!

    Yes, the filtering for number of appointments now works perfectly. And I was just going to write back about a problem with the global but I’ve just traced it to a capitalization discrepancy – doh! 😉

    Here’s a separate question: As we’re not really concerned with time, is there a way to remove the time from the top of the event box?

    Thanks again,
    debi

  • #71445

    admin
    Keymaster

    Yes – click “Use Simple Event Box” in Options.

  • #71446

    Alberto1960
    Member

    Perfect – thanks!

  • #71447

    Alberto1960
    Member

    The “Use Simple Event Box” worked great for Day and Week views. But what’s the best way to ensure that records don’t show time in month view, either? Is there another setting for that that I’m missing?

    I’ve tried removing times, but then they’re interpreted as very early and are above the scrollable area. I also tried entering 0 and 1 for the scrollable times to see everything at the top, which worked, despite the conditional red formatting for the end time and the warning I got later, except that single hour stayed stuck at the top and the calendar didn’t fill the screen height anymore.

    TIA,
    d~

  • #71450

    admin
    Keymaster

    Sorry, Debi – didn’t see this follow up request.

    To hide the time in month view, requires a little custom code snippet. To add this code:

    1. Open Calendar Settings
    2. Select your Calendar
    3. Click “Edit” next to Options
    4. Scroll to the bottom where it says “Custom JS” and paste the following code:
      /* BEGIN HIDE MONTH DATE */
      scheduler.attachEvent("onTemplatesReady", function(){
      	scheduler.templates.event_bar_date = function(start,end,ev){
      		return "";
      	};
      });
      /* END HIDE MONTH DATE */

You must be logged in to reply to this topic.