Calculating elapsed time problem

  • Follow


In Version 8, I'm trying to create a sign in/sign out database to be
used in touch screen (Kiosk) mode for our Head Start parents.

The first table includes a three-digit student ID number, student name
and room. The second table ("Sign IN") includes the student ID number
for the relationship and lookup fields for name and room. The third
table ("Sign OUT") includes the same information but will be used as
the name implies. The last table is the column report on which I need
to show student number, name, in date and time, out date and time and
elapsed time in number of hours and minutes. To get a subtotal of
hours and minutes, I will sort by classroom and student name.

I am having trouble calculating the elapsed time. I've tried using
"creation date and time" fields. I've tried using a time stamp field
and inserting the current date and time by script. Either method seems
to provide the correct date and time on the respective "In" and "Out"
records but I can't seem to get the elapsed time to calculate and
appear on the report in the format - example "4 hours, 20minutes" (or
"4.33" hours would be fine). What am I doing wrong - is there a better
way to do get this calculation?

0
Reply JoelL 1/2/2006 8:00:09 PM

See if this CF (used as a calculcation) might solve your problem.

http://www.briandunning.com/cf/59

Matt

JoelL wrote:

> In Version 8, I'm trying to create a sign in/sign out database to be
> used in touch screen (Kiosk) mode for our Head Start parents.
> 
> The first table includes a three-digit student ID number, student name
> and room. The second table ("Sign IN") includes the student ID number
> for the relationship and lookup fields for name and room. The third
> table ("Sign OUT") includes the same information but will be used as
> the name implies. The last table is the column report on which I need
> to show student number, name, in date and time, out date and time and
> elapsed time in number of hours and minutes. To get a subtotal of
> hours and minutes, I will sort by classroom and student name.
> 
> I am having trouble calculating the elapsed time. I've tried using
> "creation date and time" fields. I've tried using a time stamp field
> and inserting the current date and time by script. Either method seems
> to provide the correct date and time on the respective "In" and "Out"
> records but I can't seem to get the elapsed time to calculate and
> appear on the report in the format - example "4 hours, 20minutes" (or
> "4.33" hours would be fine). What am I doing wrong - is there a better
> way to do get this calculation?



-- 

0
Reply Matt 1/2/2006 9:29:29 PM


CF appears ideal but I cannot figure out how to use it - apparently,
the user must select parts of the CF to use because if I cut and paste
in its entirety, FM constantly asks for clarification which I am
unable to provide.

Any suggestions?

JL


On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End> wrote:

>See if this CF (used as a calculcation) might solve your problem.
>
>http://www.briandunning.com/cf/59
>
>Matt
>
>JoelL wrote:
>
>> In Version 8, I'm trying to create a sign in/sign out database to be
>> used in touch screen (Kiosk) mode for our Head Start parents.
>> 
>> The first table includes a three-digit student ID number, student name
>> and room. The second table ("Sign IN") includes the student ID number
>> for the relationship and lookup fields for name and room. The third
>> table ("Sign OUT") includes the same information but will be used as
>> the name implies. The last table is the column report on which I need
>> to show student number, name, in date and time, out date and time and
>> elapsed time in number of hours and minutes. To get a subtotal of
>> hours and minutes, I will sort by classroom and student name.
>> 
>> I am having trouble calculating the elapsed time. I've tried using
>> "creation date and time" fields. I've tried using a time stamp field
>> and inserting the current date and time by script. Either method seems
>> to provide the correct date and time on the respective "In" and "Out"
>> records but I can't seem to get the elapsed time to calculate and
>> appear on the report in the format - example "4 hours, 20minutes" (or
>> "4.33" hours would be fine). What am I doing wrong - is there a better
>> way to do get this calculation?

0
Reply JoelL 1/2/2006 11:49:06 PM

Should work in its entirety.  Have you defined these three parameters in 
the top portion of the CF dialog: TStampBegin; TStampEnd; Format


JoelL wrote:
> CF appears ideal but I cannot figure out how to use it - apparently,
> the user must select parts of the CF to use because if I cut and paste
> in its entirety, FM constantly asks for clarification which I am
> unable to provide.
> 
> Any suggestions?
> 
> JL
> 
> 
> On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End> wrote:
> 
>> See if this CF (used as a calculcation) might solve your problem.
>>
>> http://www.briandunning.com/cf/59
>>
>> Matt
>>
>> JoelL wrote:
>>
>>> In Version 8, I'm trying to create a sign in/sign out database to be
>>> used in touch screen (Kiosk) mode for our Head Start parents.
>>>
>>> The first table includes a three-digit student ID number, student name
>>> and room. The second table ("Sign IN") includes the student ID number
>>> for the relationship and lookup fields for name and room. The third
>>> table ("Sign OUT") includes the same information but will be used as
>>> the name implies. The last table is the column report on which I need
>>> to show student number, name, in date and time, out date and time and
>>> elapsed time in number of hours and minutes. To get a subtotal of
>>> hours and minutes, I will sort by classroom and student name.
>>>
>>> I am having trouble calculating the elapsed time. I've tried using
>>> "creation date and time" fields. I've tried using a time stamp field
>>> and inserting the current date and time by script. Either method seems
>>> to provide the correct date and time on the respective "In" and "Out"
>>> records but I can't seem to get the elapsed time to calculate and
>>> appear on the report in the format - example "4 hours, 20minutes" (or
>>> "4.33" hours would be fine). What am I doing wrong - is there a better
>>> way to do get this calculation?
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
0
Reply Howard 1/3/2006 12:04:31 AM

In attempting to copy and paste the formula into my calculation field
"Elapsed Time,"  FM highlights "format" in that formula and tells me
"The specified field cannot be found." What am I missing here?

JL

On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End> wrote:

>See if this CF (used as a calculcation) might solve your problem.
>
>http://www.briandunning.com/cf/59
>
>Matt
>
>JoelL wrote:
>
>> In Version 8, I'm trying to create a sign in/sign out database to be
>> used in touch screen (Kiosk) mode for our Head Start parents.
>> 
>> The first table includes a three-digit student ID number, student name
>> and room. The second table ("Sign IN") includes the student ID number
>> for the relationship and lookup fields for name and room. The third
>> table ("Sign OUT") includes the same information but will be used as
>> the name implies. The last table is the column report on which I need
>> to show student number, name, in date and time, out date and time and
>> elapsed time in number of hours and minutes. To get a subtotal of
>> hours and minutes, I will sort by classroom and student name.
>> 
>> I am having trouble calculating the elapsed time. I've tried using
>> "creation date and time" fields. I've tried using a time stamp field
>> and inserting the current date and time by script. Either method seems
>> to provide the correct date and time on the respective "In" and "Out"
>> records but I can't seem to get the elapsed time to calculate and
>> appear on the report in the format - example "4 hours, 20minutes" (or
>> "4.33" hours would be fine). What am I doing wrong - is there a better
>> way to do get this calculation?

0
Reply Joel 1/3/2006 2:09:16 AM

I might be misunderstanding what your saying but it sounds like you
have a "SignIn" table and a "SignOut" table.  You should only have 1
table for this with the fields ID Student, SignIn TimeStamp,
SignOutTimeStamp, and TotalTime.
TotalTime is formated as a calc field of type time with the formula
SignOutTimeStamp - SignInTimeStamp.

0
Reply FP 1/3/2006 5:53:32 AM

You're converting a CF to a calculation. You need to make sure you have
fields in your file that correspond with the variables defined in the
CF.

You need to have fields named TStampBegin, TStampEnd and Format, or
adjust the calculation to reflect the actual names of the fields.

Matt

Joel L wrote:

> In attempting to copy and paste the formula into my calculation field
> "Elapsed Time,"  FM highlights "format" in that formula and tells me
> "The specified field cannot be found." What am I missing here?
> 
> JL
> 
> On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End> wrote:
> 
> > See if this CF (used as a calculcation) might solve your problem.
> > 
> > http://www.briandunning.com/cf/59
> > 
> > Matt
> > 
> > JoelL wrote:
> > 
> >> In Version 8, I'm trying to create a sign in/sign out database to
> be >> used in touch screen (Kiosk) mode for our Head Start parents.
> >> 
> >> The first table includes a three-digit student ID number, student
> name >> and room. The second table ("Sign IN") includes the student
> ID number >> for the relationship and lookup fields for name and
> room. The third >> table ("Sign OUT") includes the same information
> but will be used as >> the name implies. The last table is the column
> report on which I need >> to show student number, name, in date and
> time, out date and time and >> elapsed time in number of hours and
> minutes. To get a subtotal of >> hours and minutes, I will sort by
> classroom and student name.  >> 
> >> I am having trouble calculating the elapsed time. I've tried using
> >> "creation date and time" fields. I've tried using a time stamp
> field >> and inserting the current date and time by script. Either
> method seems >> to provide the correct date and time on the
> respective "In" and "Out" >> records but I can't seem to get the
> elapsed time to calculate and >> appear on the report in the format -
> example "4 hours, 20minutes" (or >> "4.33" hours would be fine). What
> am I doing wrong - is there a better >> way to do get this
> calculation?



-- 

0
Reply Matt 1/3/2006 9:35:31 AM

I did change my table names to coincide with the formula names. I even
added a field called "format." None of this worked. What type of
information goes into the "format" field - it was not part of my
original table? None of this gives me the results shown on that
website.


On Tue, 03 Jan 2006 09:35:31 GMT, "Matt Wills" <Im@Witz.End> wrote:

>You're converting a CF to a calculation. You need to make sure you have
>fields in your file that correspond with the variables defined in the
>CF.
>
>You need to have fields named TStampBegin, TStampEnd and Format, or
>adjust the calculation to reflect the actual names of the fields.
>
>Matt
>
>Joel L wrote:
>
>> In attempting to copy and paste the formula into my calculation field
>> "Elapsed Time,"  FM highlights "format" in that formula and tells me
>> "The specified field cannot be found." What am I missing here?
>> 
>> JL
>> 
>> On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End> wrote:
>> 
>> > See if this CF (used as a calculcation) might solve your problem.
>> > 
>> > http://www.briandunning.com/cf/59
>> > 
>> > Matt
>> > 
>> > JoelL wrote:
>> > 
>> >> In Version 8, I'm trying to create a sign in/sign out database to
>> be >> used in touch screen (Kiosk) mode for our Head Start parents.
>> >> 
>> >> The first table includes a three-digit student ID number, student
>> name >> and room. The second table ("Sign IN") includes the student
>> ID number >> for the relationship and lookup fields for name and
>> room. The third >> table ("Sign OUT") includes the same information
>> but will be used as >> the name implies. The last table is the column
>> report on which I need >> to show student number, name, in date and
>> time, out date and time and >> elapsed time in number of hours and
>> minutes. To get a subtotal of >> hours and minutes, I will sort by
>> classroom and student name.  >> 
>> >> I am having trouble calculating the elapsed time. I've tried using
>> >> "creation date and time" fields. I've tried using a time stamp
>> field >> and inserting the current date and time by script. Either
>> method seems >> to provide the correct date and time on the
>> respective "In" and "Out" >> records but I can't seem to get the
>> elapsed time to calculate and >> appear on the report in the format -
>> example "4 hours, 20minutes" (or >> "4.33" hours would be fine). What
>> am I doing wrong - is there a better >> way to do get this
>> calculation?

0
Reply Joel 1/4/2006 3:50:13 AM

With a table for sign in and a second table for sign out,, I can get
two different date stamps - one for the sign in (TStampBegin) and one
for the sign out (TStampEnd). I can them design  them both on a single
line of the colum report.

When I try to use a single table as you suggest, with a single layout
or one layout each for TStampBegin and TStampEnd from the same table,
I am essentially creating two seperate records, one that shows the
begin time and the other that shows the end time. That would still be
OK if I could only get the calculation to show  the elapsed time but I
can't. One would hope and think the time formula would be as simple as
TStampEnd  - TStampBegin but it is not. 

Still very perplexing!



On 2 Jan 2006 21:53:32 -0800, "FP" <ab@pottnerconsulting.ca> wrote:

>I might be misunderstanding what your saying but it sounds like you
>have a "SignIn" table and a "SignOut" table.  You should only have 1
>table for this with the fields ID Student, SignIn TimeStamp,
>SignOutTimeStamp, and TotalTime.
>TotalTime is formated as a calc field of type time with the formula
>SignOutTimeStamp - SignInTimeStamp.

0
Reply Joel 1/4/2006 4:19:47 AM

In article <nhhmr1lrdcnd042td4japrobo7n6164eur@4ax.com>, Joel L
<goldbdwyjogold@hotmail.com> wrote:

> With a table for sign in and a second table for sign out,, I can get
> two different date stamps - one for the sign in (TStampBegin) and one
> for the sign out (TStampEnd). I can them design  them both on a single
> line of the colum report.
> 
> When I try to use a single table as you suggest, with a single layout
> or one layout each for TStampBegin and TStampEnd from the same table,
> I am essentially creating two seperate records, one that shows the
> begin time and the other that shows the end time. That would still be
> OK if I could only get the calculation to show  the elapsed time but I
> can't. One would hope and think the time formula would be as simple as
> TStampEnd  - TStampBegin but it is not. 
> 
> Still very perplexing!

A Time Elapsed calculation normally is that simple (unless you're going
past 12:00 midnight of course).

The problem here is that you've got two tables - how are you matching
the TStampBegin and TStampEnd records to each other?? I'm guessing that
you're picking up the wrong record.

Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 1/4/2006 5:15:16 AM

The person who posted the CF left it pretty much up to the user to
figure out how to use it.

With fields named TStampBegin, TStampEnd and Format in place the CF
will behave like a calculation to display the time elapsed between
TStampBegin and TStampEnd, in a format determined by the value of
Format.

The last Case statement gives you the permitted values of Format:
"Minutes, Hours, Days or String."

In the end, though, all this calc does is subtract TStampBegin from
TSEnd to arrive at ElapsedSeconds, then divides that by a certain
number to display the result in your preferred way. If Format is
"Hours", ElapsedSeconds is divided by 60, and there's your answer.

If wx.yz hours is all you'll ever need, why not make your ElapsedTime =
( TSEnd - TSBegin ) / 60 and be done with it?

Matt

Joel L wrote:

> I did change my table names to coincide with the formula names. I even
> added a field called "format." None of this worked. What type of
> information goes into the "format" field - it was not part of my
> original table? None of this gives me the results shown on that
> website.
> 
> 
> On Tue, 03 Jan 2006 09:35:31 GMT, "Matt Wills" <Im@Witz.End> wrote:
> 
> > You're converting a CF to a calculation. You need to make sure you
> > have fields in your file that correspond with the variables defined
> > in the CF.
> > 
> > You need to have fields named TStampBegin, TStampEnd and Format, or
> > adjust the calculation to reflect the actual names of the fields.
> > 
> > Matt
> > 
> > Joel L wrote:
> > 
> >> In attempting to copy and paste the formula into my calculation
> field >> "Elapsed Time,"  FM highlights "format" in that formula and
> tells me >> "The specified field cannot be found." What am I missing
> here?  >> 
> >> JL
> >> 
> >> On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End> wrote:
> >> 
> >> > See if this CF (used as a calculcation) might solve your problem.
> >> > 
> >> > http://www.briandunning.com/cf/59
> >> > 
> >> > Matt
> >> > 
> >> > JoelL wrote:
> >> > 
> >> >> In Version 8, I'm trying to create a sign in/sign out database
> to >> be >> used in touch screen (Kiosk) mode for our Head Start
> parents.  >> >> 
> >> >> The first table includes a three-digit student ID number,
> student >> name >> and room. The second table ("Sign IN") includes
> the student >> ID number >> for the relationship and lookup fields
> for name and >> room. The third >> table ("Sign OUT") includes the
> same information >> but will be used as >> the name implies. The last
> table is the column >> report on which I need >> to show student
> number, name, in date and >> time, out date and time and >> elapsed
> time in number of hours and >> minutes. To get a subtotal of >> hours
> and minutes, I will sort by >> classroom and student name.  >> 
> >> >> I am having trouble calculating the elapsed time. I've tried
> using >> >> "creation date and time" fields. I've tried using a time
> stamp >> field >> and inserting the current date and time by script.
> Either >> method seems >> to provide the correct date and time on the
> >> respective "In" and "Out" >> records but I can't seem to get the
> >> elapsed time to calculate and >> appear on the report in the
> format - >> example "4 hours, 20minutes" (or >> "4.33" hours would be
> fine). What >> am I doing wrong - is there a better >> way to do get
> this >> calculation?



-- 

0
Reply Matt 1/4/2006 12:14:23 PM

Nope, wrong. Dividing by 60 would yield minutes.

That should be 

ElapsedTime = ( TSEnd - TSBegin ) / 3600

Matt

Matt Wills wrote:

> The person who posted the CF left it pretty much up to the user to
> figure out how to use it.
> 
> With fields named TStampBegin, TStampEnd and Format in place the CF
> will behave like a calculation to display the time elapsed between
> TStampBegin and TStampEnd, in a format determined by the value of
> Format.
> 
> The last Case statement gives you the permitted values of Format:
> "Minutes, Hours, Days or String."
> 
> In the end, though, all this calc does is subtract TStampBegin from
> TSEnd to arrive at ElapsedSeconds, then divides that by a certain
> number to display the result in your preferred way. If Format is
> "Hours", ElapsedSeconds is divided by 60, and there's your answer.
> 
> If wx.yz hours is all you'll ever need, why not make your ElapsedTime
> = ( TSEnd - TSBegin ) / 60 and be done with it?
> 
> Matt
> 
> Joel L wrote:
> 
> > I did change my table names to coincide with the formula names. I
> > even added a field called "format." None of this worked. What type
> > of information goes into the "format" field - it was not part of my
> > original table? None of this gives me the results shown on that
> > website.
> > 
> > 
> > On Tue, 03 Jan 2006 09:35:31 GMT, "Matt Wills" <Im@Witz.End> wrote:
> > 
> > > You're converting a CF to a calculation. You need to make sure you
> > > have fields in your file that correspond with the variables
> > > defined in the CF.
> > > 
> > > You need to have fields named TStampBegin, TStampEnd and Format,
> > > or adjust the calculation to reflect the actual names of the
> > > fields.
> > > 
> > > Matt
> > > 
> > > Joel L wrote:
> > > 
> > >> In attempting to copy and paste the formula into my calculation
> > field >> "Elapsed Time,"  FM highlights "format" in that formula and
> > tells me >> "The specified field cannot be found." What am I missing
> > here?  >> 
> > >> JL
> > >> 
> > >> On Mon, 02 Jan 2006 21:29:29 GMT, "Matt Wills" <Im@Witz.End>
> > wrote:  >> 
> > >> > See if this CF (used as a calculcation) might solve your
> > problem.  >> > 
> > >> > http://www.briandunning.com/cf/59
> > >> > 
> > >> > Matt
> > >> > 
> > >> > JoelL wrote:
> > >> > 
> > >> >> In Version 8, I'm trying to create a sign in/sign out database
> > to >> be >> used in touch screen (Kiosk) mode for our Head Start
> > parents.  >> >> 
> > >> >> The first table includes a three-digit student ID number,
> > student >> name >> and room. The second table ("Sign IN") includes
> > the student >> ID number >> for the relationship and lookup fields
> > for name and >> room. The third >> table ("Sign OUT") includes the
> > same information >> but will be used as >> the name implies. The
> > last table is the column >> report on which I need >> to show
> > student number, name, in date and >> time, out date and time and >>
> > elapsed time in number of hours and >> minutes. To get a subtotal
> > of >> hours and minutes, I will sort by >> classroom and student
> > name.  >> >> >> I am having trouble calculating the elapsed time.
> > I've tried using >> >> "creation date and time" fields. I've tried
> > using a time stamp >> field >> and inserting the current date and
> > time by script.  Either >> method seems >> to provide the correct
> > date and time on the >> respective "In" and "Out" >> records but I
> > can't seem to get the >> elapsed time to calculate and >> appear on
> > the report in the format - >> example "4 hours, 20minutes" (or >>
> > "4.33" hours would be fine). What >> am I doing wrong - is there a
> > better >> way to do get this >> calculation?



-- 

0
Reply Matt 1/4/2006 12:21:47 PM

I thought this was going to be a simple project - I've been doing
FileMaker databases for many years. Instead, in spite of many hours of
experimenting, the solution continues to elude me - or in your
terminology, I continue to be "harassed by the hardship." This is now
a quest now and the solution might be my grail.

Everything works perfectly if I manually type in begin time and end
time on each record - an unacceptable method for this project but
attempting to use time stamps seems to be preventing the elapsed time
calc.

If I use a single table and layout for TStampBegin and TStampEnd, I
will have to create two records per student each day - one for IN time
and one for OUT time. A Form layout would then show all daily Begin's
(same as IN times) and Ends (same as OUT times) and a summary field
would have to somehow calculate TStampEND-TStampBegin for each "pair"
of Student ID's. Isn't the problem with this the fact that a Summary
Field can only show the given results such as "Total of," "Average
of," etc?...it has not "Difference Between" choice.

With three tables -  each using the Student ID field used to create
the relationship, I can use one table for TStampBegin, another . table
for TStampEnd and the third table for the column form layed out so
that on a single line, I could capture TStampBegin, TStampEnd and a
calculation field called ElapsedTime to show: TStampEnd - TstampBegin.

Are there any holes in this way of thinking? Does use of the two
timestamp fields confuse the elapsed time calc. Would it be easier to
use a two simple time fields (one of Begin and one for End) and build
"insert creation time" into respective sign in and sign out scripts?



On Wed, 04 Jan 2006 18:15:16 +1300, Helpful Harry
<helpful_harry@nom.de.plume.com> wrote:

>In article <nhhmr1lrdcnd042td4japrobo7n6164eur@4ax.com>, Joel L
><goldbdwyjogold@hotmail.com> wrote:
>
>> With a table for sign in and a second table for sign out,, I can get
>> two different date stamps - one for the sign in (TStampBegin) and one
>> for the sign out (TStampEnd). I can them design  them both on a single
>> line of the colum report.
>> 
>> When I try to use a single table as you suggest, with a single layout
>> or one layout each for TStampBegin and TStampEnd from the same table,
>> I am essentially creating two seperate records, one that shows the
>> begin time and the other that shows the end time. That would still be
>> OK if I could only get the calculation to show  the elapsed time but I
>> can't. One would hope and think the time formula would be as simple as
>> TStampEnd  - TStampBegin but it is not. 
>> 
>> Still very perplexing!
>
>A Time Elapsed calculation normally is that simple (unless you're going
>past 12:00 midnight of course).
>
>The problem here is that you've got two tables - how are you matching
>the TStampBegin and TStampEnd records to each other?? I'm guessing that
>you're picking up the wrong record.
>
>Helpful Harry                   
>Hopefully helping harassed humans happily handle handiwork hardships  ;o)

0
Reply Joel 1/5/2006 1:46:55 PM

In article <1136267612.434304.125500@g14g2000cwa.googlegroups.com>,
 "FP" <ab@pottnerconsulting.ca> wrote:

> I might be misunderstanding what your saying but it sounds like you
> have a "SignIn" table and a "SignOut" table.  You should only have 1
> table for this with the fields ID Student, SignIn TimeStamp,
> SignOutTimeStamp, and TotalTime.
> TotalTime is formated as a calc field of type time with the formula
> SignOutTimeStamp - SignInTimeStamp.

I have read the various postings in this thread.

I have built a customized timecard system that does what you want.

My solution has three tables. 

One table is for persons (I call them "employees"). It stores the 
information on that person.

A second table is for timecards. This stores the timestamp in and 
timestamp out for a shift, including timestamps out and in for breaks. 
It calculates the total time worked by subtracting the various 
timestamps out from the various timestamps in, including start and end 
of shift, and all breaks. Up to 2 breaks are allowed in my solution. It 
also includes error checking to ensure that the timestamps are in the 
correct sequence, i.e., the employee checks in for the shift before he 
checks out for the shift, that break timestamps are betweeen the start 
and end of shift, the break timestamps are in the correct logical 
sequence, etc. It also has provision for recording sick time and 
vacation time, and for an employee working up to a break, going out on 
break, and then not returning. Summaries of hours worked, hours of 
sicktime and vacation time can be generated for each employee, etc.

A third table is solely for storing employee ID and password. This keeps 
the passwords out of the employee table and the timecard table.

The three tables are related by employeeID, which is a 
computer-generated serial number for each employee record.

Employees operate the system entirely by pushubuttons, which call 
various scripts, and by checkboxes which cause calculations. The system 
is normally open in a limited-purpose employe account, which does not 
give them any menus or other normal Filemaker commands, All they can do 
is push the pushbuttons and enter data. In fact the only data they can 
enter manually is their employee ID and password; all the times are 
generated by calculation when an employee checks a checkbox.

In fact, the employee can not manually enter any times; he can only push 
pushbuttons and check checkboxes.

When an employee logs in, he gets a display of his most recent time 
card. If he is still on the shift for that time card, he can click on 
the appropriate checkbox to check out for a break or for the end of 
shift, or to check back in from a break. The database calls the current 
compute system Timestamp to insert in the Timestamp field for that event 
when he clicks the checkbox. Subsequent actions on the checkbox have no 
effect. If he makes an error and checks the wrong box, he has to contact 
his manger to correct the error.

If he is logging in for a new shift, he pushes the pushbutton for a new 
timecard, and then clicks in the start of shift checkbox.

When done, he hits the Record and Log Out pushbutton, which commits the 
timecard record and logs him out. The employee start screen is then 
displayed, ready for the next employee.

The manager has a different account, that allows creating new employees, 
correcting errors, and generating summaries, etc.

From this description you can perhaps see your way to designing a system 
that will meet your needs.

If you want a copy of my system, I will want some payment. If 
interested, send me an email, following the instructions in my signature 
block on this posting.

In any case, I can assure you that calculations of the form
TimeStamp1 - TimeStamp2
work fine. You just have to have the right values for the two timestamps.

Bill Collins

-- 
For email, remove invalid.
0
Reply Bill 1/5/2006 5:44:01 PM

Joel L (Pan out all the gold) wrote:
> If I use a single table and layout for TStampBegin and TStampEnd, I
> will have to create two records per student each day - one for IN time
> and one for OUT time. A Form layout would then show all daily Begin's
> (same as IN times) and Ends (same as OUT times) and a summary field
> would have to somehow calculate TStampEND-TStampBegin for each "pair"
> of Student ID's.

You should have 1 time table with 5 fields:
ID Student [Number]
TimeIn [TimeStamp]
TimeOut [TimeStamp]
TimeElapsed [calculated time field with formula:
  If(IsEmpty(TimeOut), "", TimeOut - TimeIn)
TimeSummary [Summary of field "TimeElapsed"]

When the student signs in a record is created populating the "ID
Student" and "TimeIn" fields.  When the student signs out, a script is
run that finds that students' record and populates the "TimeOut" field.
The TimeElapsed field WILL correctly calculate once the TimeOut has
been entered.
>From this table you can create multiple layouts to display the
information.

0
Reply FP 1/6/2006 1:59:41 AM

In article <9i8qr1h3s0077bq7e94fd684ukfhaprkjl@4ax.com>, "Joel L (Pan
out all the gold)" <goldbdwyjogold@hotmail.com> wrote:

> I thought this was going to be a simple project - I've been doing
> FileMaker databases for many years. Instead, in spite of many hours of
> experimenting, the solution continues to elude me - or in your
> terminology, I continue to be "harassed by the hardship." This is now
> a quest now and the solution might be my grail.
> 
> Everything works perfectly if I manually type in begin time and end
> time on each record - an unacceptable method for this project but
> attempting to use time stamps seems to be preventing the elapsed time
> calc.
> 
> If I use a single table and layout for TStampBegin and TStampEnd, I
> will have to create two records per student each day - one for IN time
> and one for OUT time. A Form layout would then show all daily Begin's
> (same as IN times) and Ends (same as OUT times) and a summary field
> would have to somehow calculate TStampEND-TStampBegin for each "pair"
> of Student ID's. Isn't the problem with this the fact that a Summary
> Field can only show the given results such as "Total of," "Average
> of," etc?...it has not "Difference Between" choice.

Each record could have it's own TimeElapsed:

          TimeOut - TimeIn

and then the total time can be given by a summary field of:

          Sum(TimeElapsed)



> With three tables -  each using the Student ID field used to create
> the relationship, I can use one table for TStampBegin, another . table
> for TStampEnd and the third table for the column form layed out so
> that on a single line, I could capture TStampBegin, TStampEnd and a
> calculation field called ElapsedTime to show: TStampEnd - TstampBegin.
> 
> Are there any holes in this way of thinking? Does use of the two
> timestamp fields confuse the elapsed time calc. 

The number of tables isn't really the problem, it should still work ...
assuming that:

    - TStampBegin and TStampEnd are defined as Time field
    
    - ElapsedTime is defined as a Calculation field returning
      a Time result and is unstored

    - The relationship you're using to connect the tables is picking
      up the correct records and fields

You might have to upload the file somewhere so someone can have a look
at it. Unfortunately my versions are probably too old for me to be able
to do that - I haven't got FileMaker 7 or 8.



> Would it be easier to use a two simple time fields (one of Begin and
> one for End) and build "insert creation time" into respective sign in
> and sign out scripts?

You could do. That would remove any problem of the relationship picking
up the wrong records.


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 1/6/2006 5:14:19 AM

Of the several solutions offered, this one from pottnerconsulting
worked the best. It caused me to think about the ultimate solution in
a different way - having to so a scripted "find" of the existing
respective record in order to then add the out time. The fact that
each student already has an assigned number which does not vary
required a related table with student number and related information
but the actual IN, OUT and ELAPSED time worked well.

And to think I was about ready to give up.

Thank you!



On 5 Jan 2006 17:59:41 -0800, "FP" <ab@pottnerconsulting.ca> wrote:

>Joel L (Pan out all the gold) wrote:
>> If I use a single table and layout for TStampBegin and TStampEnd, I
>> will have to create two records per student each day - one for IN time
>> and one for OUT time. A Form layout would then show all daily Begin's
>> (same as IN times) and Ends (same as OUT times) and a summary field
>> would have to somehow calculate TStampEND-TStampBegin for each "pair"
>> of Student ID's.
>
>You should have 1 time table with 5 fields:
>ID Student [Number]
>TimeIn [TimeStamp]
>TimeOut [TimeStamp]
>TimeElapsed [calculated time field with formula:
>  If(IsEmpty(TimeOut), "", TimeOut - TimeIn)
>TimeSummary [Summary of field "TimeElapsed"]
>
>When the student signs in a record is created populating the "ID
>Student" and "TimeIn" fields.  When the student signs out, a script is
>run that finds that students' record and populates the "TimeOut" field.
>The TimeElapsed field WILL correctly calculate once the TimeOut has
>been entered.
>>From this table you can create multiple layouts to display the
>information.

0
Reply Joel 1/10/2006 2:23:32 AM

16 Replies
348 Views

(page loaded in 0.181 seconds)

Similiar Articles:


















7/22/2012 8:21:38 AM


Reply: