Domino R5 Parent Form needs a field which calculates total from field in each in each child response

I have a Parent form in Domino R5 and it uses the web. Users create projects and the response is used for entering server requirements.    

I have NumberServers field in child response document.  I need a field in the Parent form to Calculate Total number of Servers from all responses.    I want to show a field at the parent level that can add it.  

Or can this be shown in a view somehow?  I have been grappling with this.

a98pelle-expertAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

a98pelle-expertAuthor Commented:
Only one response level under the parent.
0
Sjef BosmanGroupware ConsultantCommented:
Make a view of the responses only, no response hierarchy, the first column should be sorted by the key of the parent (must also be present in the response document), and put the number of servers in a column.

In the parent form, you can create a computed-for-display field with a formula like

list:= @DbLookup("":"NoCache"; ""; "TheNewView"; parentkey; "NumberServers");
tot:= @Sum(list);
@if(@IsError(list); 0; @IsError(tot); "Non-numeric NumberServers!"; tot)
0
a98pelle-expertAuthor Commented:
Thanks I will give this a try and let you know this morning if I get it working.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

a98pelle-expertAuthor Commented:
Is the parent key, the document ID of the parent which is passed down to the response?
0
Sjef BosmanGroupware ConsultantCommented:
That's for you to decide. Normally, it is a data field present in both documents, unique for the parent but shared for the response. If there is no such field, then Notes provides you with one: the parent has @DocumentUniqueID and the response has the field $Ref.

The view with the response documents could therefore have a first column with formula
@Text($Ref)

The lookup would then be
list:= @DbLookup("":"NoCache"; ""; "TheNewView"; @Text(@DocumentUniqueI); "NumberServers");
tot:= @Sum(list);
@if(@IsError(list); 0; @IsError(tot); "Non-numeric NumberServers!"; tot)

Or something similar to that.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
a98pelle-expertAuthor Commented:
Thank you. I really appreciate your help.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.