Jump to content

Needing some help with Text Value List


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

Recommended Posts

Hi guys,

Sorry if this seems like a newb question,

I have a time card data base keeping track of my hours, and now have come across a Stat holiday which I want to account for.

I have a column marked paid, which is a value list, of (Paid,Un Paid, Carry Over,Time & 1/2) ect. I also have a column for work hours.

Now what I want to do, is if one of fields in the Paid Column is selected as Time & 1/2 then the work hours field for that day which is directly besides it, gets re-calculated to include the time and 1/2. If that makes any sense.

Also on another note, in My database, I have 3 sections for entering in "what time I started" and "what time I ended", for a total 6 columns to allow for lunch and supper breaks. Problem is that if I work late evening on one day to early morning the next as (10:00pm - 1:00am), It won`t properly calculate it. Is there some coding or a way so that I can continue to enter my times per normal, with out entering the date as well for every entry, that will run on the back end to properly calculate the work hours.

Sorry for second one in there, I realize their fairly separate issues,

Any help is greatly appreciated,

Thanks,

soundguy_99

Link to comment
Share on other sites

You should be using individual records in a related table, instead of what you call "sections".

Also, I don't think "Paid,Un Paid, Carry Over,Time & 1/2" should all be in the same field. A time segment is either paid or not - regardless of being "Time & 1/2" or not. 'One fact per field' is a good thumb rule to go by. This way, if you use a checkbox entering "1" into a Overtime field, you can use a calculation like =

Case ( Overtime ; Amount * 1.5 )






To allow for crossing midnight when calculating duration, try =




EndTime - StartTime + ( EndTime < StartTime ) * 86400 

Link to comment
Share on other sites

Thanks,

The reason why I was trying to get it all into 1 field was due to the room I had on my time card sheet. I don`t have allot of room to add more columns before it won`t fit on the page, and its already in landscape mode as it is.

I will see what I can do though.

As to the crossing midnight calculation, I have been using the Hour( Time_End - Time_Start ) + Minute( Time_End - Time_Start ) /60 Calculation, so I think I understand about the + ( EndTime < StartTime ) part but how does the

* 86400 fit into that calculation.

I will Try it and get back to you,

Thanks again,

Soundguy

Link to comment
Share on other sites

The reason why I was trying to get it all into 1 field was due to the room I had on my time card sheet

You should not let layout consideration affect your data structure. In any case, I am not suggesting "to add more columns", only that each "row" be a separate record. You'd probably want to use a portal for this.

I have been using the Hour( Time_End - Time_Start ) + Minute( Time_End - Time_Start ) /60 Calculation

To what effect?

how does the * 86400 fit into that calculation.

It adds 24 hours to the result when the condition ( EndTime < StartTime ) returns true.

Link to comment
Share on other sites

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