2 Replies Latest reply on Jul 16, 2013 1:57 PM by DranLang

# Adding field values in a portal

### Title

Adding field values in a portal

### Post

Hi everyone, got a question for the addition of field values in a portal.  I have 3 fields involved in this addition (Tot, Length, and Total).  To begin with, Tot is not in a portal it's just a field outside the portal.  I would like to add the value of Tot to the value of Length and store it in Total (Total = Tot + Length) which by the way are in the portal (Length and Total are in the portal).  And then I would like to add the value of the Total of the first record with the value of my second value of Length (Total + Length) and save it again to the field Total. Problem is I can't get to make the second result correct.

Is there a way to do this?

Thanks everyone.

• ###### 1. Re: Adding field values in a portal

Is this the result that you want?

tot = 5
Length Total
1         6
3        9
5       14

If that's what you want, it would be simpler to make tot the initial Length value in the first record of the portal. Then Total becomes a summary field that computes a running total of Length.

If that's not possible, then you need a more complex calculation field for Total:

Let ( R = Get ( RecordNumber ) ;
If ( R = 1 ; ParentTO::tot + Length ;  GetNthRecord ( Total ; R - 1 ) + Length )
) // Let

• ###### 2. Re: Adding field values in a portal

Thanks again Phil, I'm learning a lot from you. Thanks again!

Cheers