Customzing fields.

General Information about upcoming products, upgrades, etc.
Posts: 24
Joined: Sat Sep 08, 2007 3:06 am
PostPosted: Mon Oct 29, 2007 9:33 am
Hi,

Guys im runing a clinic. So what i want to do is to when the appt time end gets past the current time the color of the appointment will change... can u guys help me with the calculations??

thanks in advance..
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Oct 30, 2007 8:28 am
Hi there. Sorry for the delay in posting a reply to you!

So if you're using FileMaker 9 you should be able to do this with the built in features of Conditional formatting: I'd suggest changing the fill color of the Appointment title as a place to start.

No matter how you approach it, this is the calc you'll probably want to use (you didn't mention which version of our calendar you're using, so these are the fields from SeedCode Complete):

Timestamp ( Get ( CurrentDate ) ; Get ( CurrentTime ) ) ≥Timestamp ( ApptDateEndCalc_k ; ApptTimeEndCalc )

That will return a 1 or True if the appointment end time is passed: of course you'll have to make sure this is an Unstored calculation if you use it in field definitions.

But when it comes to changing the appointment color (which means changing the appointment's type). I believe you'll want to do that with a script since the Appointment Type can not be based on an Unstored calculation. Accordingly, I'd change the color of something ELSE and leave the appointment type alone: either change the color of a field using conditional formatting, or add a new "expired" icon that us returned when the calculation above is true.
John Sindelar
SeedCode
Posts: 24
Joined: Sat Sep 08, 2007 3:06 am
PostPosted: Tue Oct 30, 2007 9:27 am
thanks for your help.
im using filemaker 8.5.
So i will set a new container field such as status but how can i set the calculation to change the color of that field.
And just one more question, how can i use european date formats?

Thanks a lot
Posts: 24
Joined: Sat Sep 08, 2007 3:06 am
PostPosted: Tue Oct 30, 2007 9:30 am
sorry but i wanted to check something.

Do i define a new field by calculation and insert the callculation there or do i create a script and make the result affect the field data...again more help with changing the color??please
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Oct 30, 2007 9:35 am
To create a new calc that will present a red color when the appointment's end time has passed you'll create a new calculation field in the Appointments table. Have that calc return the type "Container" and define it like this (again, make sure the storage is set NOT to index the field):

if (
Timestamp ( Get ( CurrentDate ) ; Get ( CurrentTime ) ) ≥Timestamp ( ApptDateEndCalc_k ; ApptTimeEndCalc ) ;
Interface::IntRedGlob
)

This will return a red image we're storing in the field Interface::IntRedGlob. You can create your own fields in the Interface table to hold other images that you might want to show when the appointment's time has passed.

As for date formats, the calendar will take the date formats from your system as long as the "Set Use System Formats [ON]" script step is running in the opening script (it should already by set up that way and the script "Upon Opening" should be set to run as soon as the file opens in File Options).

Hope that helps,
John Sindelar
SeedCode
Posts: 24
Joined: Sat Sep 08, 2007 3:06 am
PostPosted: Tue Oct 30, 2007 9:37 am
thanks a lot.

Return to FileMaker Products (General)

Who is online

Users browsing this forum: No registered users and 3 guests

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