Selecting tab in tab control sets Type: can it be done?

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Sat Sep 16, 2006 9:40 am
I have edited the Mini Window Edit Appointment layout, so that the tab control includes the following tabs: "Encounter", "Call", Tox Screen", "Other." These correspond to my four appointment types (Encounter, Call, Tox Screen, Other.) Now, I'd like to set things up so that when the user selects a given tab, the resulting appointment is set to the corresponding appointment type. I've fooled around a little, trying to insert a Type field radio button array underneath the tab titles, but can't seem to get that to work. Can you suggest a solution? Thanks again for all your help with this!
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Sat Sep 16, 2006 10:19 am
I think you want to carefully overlay the tabs with buttons that set the appointment type and then navigate to the appropriate tab. Or, you can set the appointment type when you leave the Edit Appointment Mini window by having the "continue" script set the type based on whichever tab tab the users is on when the continue button is clicked.

The trick in either case is to name your tab objects in FileMaker 8.5's object info pallet and then test for the tab being frontmost using

GetLayoutObjectAttribute( "YourTabsObjectName" ; "isFrontTabPanel" )
John Sindelar
SeedCode
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Wed Oct 04, 2006 8:03 am
I've managed now to set things up so that:
1) when I click on an existing appointment in the daily calendar view, that brings up the "Edit Appointment" window, and runs a script that selects the correct tab (i.e. the tab corresponding to the encounter type -- appointment, urine screen, call, etc.) in the foreground; also
2) when I click the Continue button after reviewing or editing that appointment, the appointment type is again "set" by a script that sets the appropriate "type" based on the tab that I selected just prior to clicking Continue.

That all seems to work just fine, most of the time. But here's my latest problem: let's say I have two encounters scheduled at 6:00 pm with Joe Smith. The first is a regular 30 minute appointment (6:00 pm - 6:30 pm), and the second is a urine screen (which we schedule concomitantly), from 6:00 pm to 6:05 pm. Now, in the Daily Calendar view, when I click on Joe Smith's urine screen, that brings up the Edit Appointment window -- but with Joe Smith's 30 minute appointment displayed! The index/arrows at the top of the window show that this is "1 of 2" and in fact I can get to the urine screen just by clicking on the "next" arrow. But I'd rather be able to go directly to the urine screen when I click on it.

Is there a way to edit the relevant scripts, to achieve this?
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Oct 04, 2006 8:19 am
Congrats on getting all that tab stuff working!

But I'd rather be able to go directly to the urine screen when I click on it.


Here you're seeing some of the calendar's conflict management--when you click on that second appointment it is also bringing up all the appointments that "conflict" or overlap the appointment you've clicked on.

You have a number of options for modifying this behavior. If you edit the script "Edit Appointment { Column , Type }", you'll see that after the comment "DAY" there is another section commented "Show Duplicates If Any". You can simply turn off this behavior by adding the following to the end of the If() statement following that comment: and 1 = 2.

This would turn this behavior off for the daily view only (which is what I'd recommend). If you want to turn it off for other views you can follow this same approach in the other sections of the script commented "Month & Week", "Week & Scheduling", etc.

If you don't want to simply turn it off, you can edit the If() statement mentioned above so that it only shows duplicates in certain cases. For instance if you only want to disable it when you click on a urine screen you could append the following to what is already in the If() statement: and CalDailyAppointments::ApptType_kf = "Urine Screen"

HTH.
John Sindelar
SeedCode
Posts: 116
Joined: Mon Sep 04, 2006 1:19 pm
PostPosted: Wed Oct 04, 2006 9:49 am
I'll give it a whirl. Thanks again!

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 1 guest

cron
(855) SEEDCODE
[email protected]
Follow us: