Adding up fields

I am working on a Discussion and Response style database. In a main topic form of my primary view, my users enter the name of an assignment they are working on. Then, as the assignment progresses, they create responses to a main topic, and enter in the details of their work. Among these details is a “Time Spent” field, where my users enter in the hours spent on a particular part of an assignment. Users can enter as many responses as needed until the assignment is completed; and for each response the user will specify how many hours have been spent on that part of the assignment. What I would like to do is add up all of these hours and list them as a total somewhere (preferably both on a form and in a view, if possible.) The problem is, I can only seem to sum up a total in Main Topic documents, not in Response documents. How can I add up numbers in Response documents?

Secondly (and unrelated to the first question): in my Main Topic form, I would like to pre-populate a field (maybe a combo box, or something else that allows the user to choose from a list) with a specific list of names from our names.nsf corporate database. The list that I need is a multi-purpose group that has eight people in it. How can I pre-populate a field in a form with only those eight people’s names?

Subject: RE: Adding up fields

View totals work for response documents, but I believe the column must appear before the “responses only” column (or else use a non-hierarchical view).

On the main form, you can use @Sum(@DbLookup… in a Computed for display field, using a lookup into a view sorted either by @Text($REF), or by some key that’s unique to the main document and its responses (ProjectID, whatever).

For the name lookup, you could again use @DbLookup, this time to look up the Group document in the Groups view of the address book; or you could duplicate the list in a profile document in the database, which will give better performance.