# Discussions

View Only

## Adding 3 html formula-involved texts fields (number of days)

• #### 1.  Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 14:14
I have 3 different text (html formula involved) fields that shows a calculated number of days a project sit on a certain stage. Now, I want to create a 4th field to show the total number of days a project sat by adding 3 fields/stages. Any input on how to do that?

• #### 2.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 15:16
So can you elaborate more ,   I understand  like

There are three formula text fields which gives the number of days as output like

[Formula 1] = 12

[Formula 2] = 10

[Formula 3] = 14

On 4th field which is [Formula 4] , you need to add the 12+10+14 and show the sum as 36 in the last field .

Is this is what you are asking !!!

• #### 3.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 16:57
Yes, exactly John. I want the 4th field to say "36" as the answer going by your example.

• #### 4.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 19:31
If the 4th field is a Numeric Field:
toNumber([Formula 1] )+toNumber([Formula 2] )+toNumber([Formula 3] )

If the 4th field is a Text Field:
toText(toNumber([Formula 1] )+toNumber([Formula 2] )+toNumber([Formula 3] ))

Regards

• #### 5.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 20:51
Thanks Aiden. It is working on cases where there is a value on all 3 fields. If one of them is yet to come to pass (e.g., two stages are crossed with a delay and the third stage is yet to start), the 4th field (with the above formula) is not showing any result. Can it be fixed, even if the one of the 3 stages has "null/no/0" for a value? Sometimes, we do have cases where we skip a stage and move the project right into the next one, where, only 2 stages have applicable delays and the third one might not. Thanks for your help.

• #### 6.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 20:51
By the way, I used your "Text" field formula.

• #### 7.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 21:02
Please try below and let me know:
totext(
if ( [Formula 1] =  null or [Formula 1] = ""  , 0 , toNumber([Formula 1] )+if ( [Formula 2] =  null or [Formula 2] = ""  , 0 , toNumber([Formula 2] )+if ( [Formula 3] =  null or [Formula 3] = ""  , 0 , toNumber([Formula 3] )
)

• #### 8.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-18-2017 21:26
What i meant by "null/no value/0" is that it is 'empty' - it did not have any text or number in those fields. Sorry, for the inconvenience caused.

• #### 9.  RE: Adding 3 html formula-involved texts fields (number of days)

Posted 07-24-2017 19:13
The ( [Formula 1] = "" ) should filter those out.