Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5979 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

1 table :) tblHours

5 Fields:

nameUserName : txt field

timeIn : timestamp

timeOut : timestamp

date : date in format 01/01/2008

totalHrsInterval : Auto-Calc Field "Hour (timeOut-timeIn) & ":" & Minute ( timeOut-timeIn )"

sample record:

jsmith010188; 8/18/2008 11:13:05 AM; 8/18/2008 2:45:11 PM; 8/18/2008; 3:32

I want to Sum the totalHrsInterval fields that exist for a specific date such as

Sum(totalHrsInterval {where date = DateCurrent-1}

I would like to simply display this on a form without actually having an entirely new table...

I thought about a merge field, but I don't think I can calculate in a merge field, can I?

Posted

Why dont you just use a calc field with Time result of timeOut - timeIn? A summary field that adds that calc should give you the total.

You can then also have an unstored calc that is Get ( Current Date ) - 1.

Now when you create a new table occurence and use a self join from this new calc field to your DATE field, you can now reference the summary field from the new self join table occurence and it should display all the totals from the previous day.

Posted

man, I totally forgot about summary fields...

So I have the summary field showing the running total of the "totalHrsInterval" when grouped by "date"

then I have another field displaying that running total in a "HH:MM" format {hour(totalHrsInterval)&":"&minute(totalHrsInterval)}

However, I am trying to figure out if I am going to have to create a new table holding daily totals per user...

also, I am going to want to call the total for each weekday for the current week...

At first I was thinking a case() function, however, I am not sure how I can use a criteria, but this is what I was thinking:


#For a "totalHrMonday" field

case(

#Check day name of current date

dayName(DateCurrent)="Tuesday";

#{here's where I struggle with calling on criteria}

#get value of Monday's Total Hours

get totalHrsReadable where date = CurrentDate-1;

#Check day name of current date

dayName(DateCurrent)="Wednesday";

#{here's where I struggle with calling on criteria}

#get value of Monday's Total Hours

get totalHrsReadable where date = CurrentDate-2;

#Check day name of current date

dayName(DateCurrent)="Thursday";

#{here's where I struggle with calling on criteria}

#get value of Monday's Total Hours

get totalHrsReadable where date = CurrentDate-3;

#Check day name of current date

dayName(DateCurrent)="Friday";

#{here's where I struggle with calling on criteria}

#get value of Monday's Total Hours

get totalHrsReadable where date = CurrentDate-4;

This would be much easier if I could simply do this with a SQL select statement with a "Where" clause

I also thought I may have to create scripts to get this to work....

Posted

Ok lets start over and approach this a little differently. Tell us exactly what you are trying to achieve and we will see if there is a better way to approach your issue. Is this for a report? If not, can you live with a report?

This topic is 5979 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.