Display accumulated hours in a view

Hi There,

I have a form which is a Scheduler. This form has Date, StartTime, EndTime. For each form I can fill up 5 days with times, but not all of them is mandatory. (so the form has 5 dates field, 5 starttime fields, and 5 endtime fields )

For instance:

(Monday) 11/6/2066 “9:00:00 AM” to “5:00:00 PM”

(Tur) 11/7/2066 “” to “”

(Wed) 11/8/2066 “11:00:00 AM” to “4:00:00 PM”

(Thu) 11/9/2066 “” to “”

(Fri) 11/10/2066 “9:30:00 AM” to “5:30:00 PM”

The view should be show me this information by column under “time” header (like: 8 AM | 8:30 AM | … | 7:30 PM)

Monday – at 8 AM → 0 person working

Monday – at 8:30AM → 0 person working

Monday – at 9 AM → 1 person working

Monday – at 9:30 AM → 1 person working

(until 5 PM)

etc… (for every day)

BUT if I have another person like MIKE working on MONDAY Starting at 10:00 AM, the view have to show

on MONDAY at 10:00 AM → 2 person working

How can I do the view show this info?

Thanks a lot in advance. I’ll ppreciate any support.

Claudia

Subject: RE: Display accumulated hours in a view

It’s not clear whether your view is a calendar.

Assuming not:

The simplest way would be to create a categorized view with totals. When saving the document, calculate a list of date/times for the half-hour start intervals and store that in a hidden multivalued date field. E.g.:

10/21/06 8:00 AM

10/21/06 8:30 AM

…

10/21/06 4:30 AM

10/23/06 9:00 AM

…

Add a hidden column on the right with the formula:

multivaluefield

and set it to display multiple values on separate rows.

Then create a column formula such as:

@Text(@Date(multivaluefield)) + “\” + @Text(@Time(multivaluefield))

and categorize it.

And add a totals column somewhere whose formula is 1 (hide detail values).

Subject: RE: Display accumulated hours in a view

Hi Dear,

I am confused here, do i have to create a field with a list of this information for all days? is it not huge? or just for the information that person selected?

if i create this list, it is like = (@Text(Day1)+ " " +@Text(StartTiem1)+" "+ @Text(EndTime1)) : (@Text(Day2) … ?

Thanks for your answer. and you are right it is not a calendar view, this view has totals column as you mentioned, sorry for missing this information.

Subject: RE: Display accumulated hours in a view

do i have to create a field with a list of this information for all days? is it not huge? or just for the information that person selected?

For just the range of days and hours that the person entered information. It is not huge; the number of entries will be a little less than twice the number of hours the person works, so, presumably not more than about 100.

if i create this list, it is like = (@Text(Day1)+ " " +@Text(StartTiem1)+" "+ @Text(EndTime1)) : (@Text(Day2) … ?

No, you’ll have to use a loop. You mustn’t convert all the times to text. You need to iterate thru the half-hours and see which ones are within the interval the user entered, and add those to the list. The list will need to be a list of date/times, not a list of strings.

Subject: RE: Display accumulated hours in a view

Hi Andre

Thanks for your time, perhaps The code that i tried, it wasn’t work. I cannot understand it very well neither. Do you know a place that I can see a similar code?

that will help me to open my mind more, and learn a new solution for this issue that i have in my mind.

Thanks again. for your support