Jump to content

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

Recommended Posts

Posted

I'm working on a database that register the work time.

I have set a start time and a finish time for each case.

What i want is to count the ours of different cases, and the total of each day minus lunch time.

If put in a new start time the count says 9 ours, how can i get a count time only if there is a finish time.

If anyone has a better idea how to make the database please let me know.

I have attached the file.

register.fp7.zip

Posted

This way:

Case(not(2-Count(Start;finish));

Round(

Hour( finish - Start ) + Minute( finish - Start ) / 60 ;

2)

+

If(

GetAsNumber(finish) ≤ GetAsNumber(Start);

24;

0))

Then should you turn your calculation an unstored calc'field instead. There is no point in Sum( in the ralated table, since it will only show first related records sum if shown in main layout.

Then isn't there much point in showing the date in each portal line, since it's the same as the above ...the problem is that the user might move a registration to another date, which might be the intention?

But the metaphor sucks, since data is removed unannounced from the users view, simply by fiddling with the popup, such matters should instead be under script control allowing the user to regret his/her dealings.

Finally is GetAsNumber(finish) ≤ GetAsNumber(Start) a bit overkill, as long as the fields are of same type (well not container obivously) are comparisons posible without typecasts.

--sd

BTW With the kind of Cockney found in your template and message, should you post your questions here:

http://fmforum.filemakercenter.dk/phpBB2/index.php

registerMod.zip

Posted

Thanks for the quick reply, Søren

This part i don't understand:

"
But the metaphor sucks, since data is removed unannounced from the users view, simply by fiddling with the popup, such matters should instead be under script control allowing the user to regret his/her dealings.
Posted

Try to read the reasoning made here:

http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGHIDesign/chapter_5_section_2.html#//apple_ref/doc/uid/TP30000353-TPXREF107

Hedensted, jeg har abejdet i Løsning hos Nordic!!!!

--sd

Posted

The metaphor i understand, but how will it be better with script control with date sorting ?

Verden er "lille", kender firmaet.

Posted

Is it possible to subtract the time from ours day, if the case is cleaning ? Worktime should still be plus.

Posted

Yes it is, just fledge your calc' further:

Let(theVar=

Case(not(2-Count(Start;finish));

Round(

Hour( finish - Start ) + Minute( finish - Start ) / 60 ;

2)

+

If(

finish ≤ Start;

24;

0));Case ( PatternCount ( _Case ; "Cleaning" );-1;1) * theVar)

...please note that I have renamed your field "Case" into "_Case" ...

--sd

Posted

Don't forget to include start and finish DATEs into your calculation, otherwise a person starting at 9:00 am and working late to 2:00 am will have done -7 hours of work.

Soren's calculation traps for it, but it assumes just one day has passed.

This topic is 6505 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.