Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using next() function at group level?

Status
Not open for further replies.

dunlop1975

IS-IT--Management
May 22, 2007
124
CA
GH1 - Day
GH2 - Facility
GH3 - Room
GH4 - Time + display turnover time(*)
D - Title Participant

* Needs to be a formula based of off the next time the room is used.

essentially I need to find the next time value (GH4) to use to determine the turnover time. The function will work if I place in the group footer but the information is required above the details. I am hoping for something cleaner

i.e

11/11/09
Fac1
Room1
11:50 (turnover 40 mins)
Tech Joe Blow
Admin Jane Doe
.
.
12:30 (turnover 15 mins)
Tech Jane Smith
Eng Bill Black
.
.
12:45.....

Currently the only thing I can think of is to create a string array for the participants and place everything in GF4.
 
What if you added the table a second time, and linked on the three first group fields with an equal join, and with a < join on the time field? Then you could use:

minimum({table_1.time},{table.time})

...to get the next time in the group header and use this in your calculation.

-LB
 
Thanks for the quick reply.

I receive a "there must be a group that matches this field" error. Did I need to add a grouping based off of {table_1.time}?

I tried to just use the {table_1.time} field (assuming that the next value of "<" pulled would be what I wanted). It gives the right values for the first and last times but the rest is incorrect.

This is definately seems to bethe right path to go, I'll keep chipping at it
 
The group is whatever you are grouping on for GH#4 from your original table, which I assumed was the time field. I think you just need to add the interval condition, but I don't know what you used for the interval. Let's say you grouped by minute. Then the formula would look like this:

minimum({table_1.time},{table.time},"by minute")

The second (alias) table will appear with _1 as an extension.

-LB
 
Tclient now changed the requirement to show the turnover from the previous session.

Now it will work with a simple next() command. Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top