How to calculate the value

I have two fields both are Dailog list containing numbers , the third field is Nuber type filed which is computed .

whatever the value in both the dialog list there sum should be displayed in the third number field .

what is the formula for the third field .

i tried

  1. @If(@IsNumber(field1:field2);@sum(field1:field2);“”)

  2. @If(@IsNumber(field1+field2);@Text(field1+ field2);“”)

  3. @sum(field1:field2)

i change that number field in to dialog list also but it is not displaying the sum value , what is wrong in it .

can anyone provide me with the right formula ,

Subject: how to calculate the value

You mention the fields contain numbers, are the fields themselves number fields or text?

a) If the fields are text fields, your formula could be @TextToNumber(“0” + field1) + @TextToNumber(“0” + field2)

b) If the fields are number fields, set their default values to zero then field1+field2 will be fine.

Many people prefer text fields - even for numbers. If you have a text field and want to make sure the user doesn’t place text within it, use this on field validation:

@If(field1=“”;@Success;

@Matches(field1; “+{0-9}”);@Success;

@Failure(“Invalid Character in field1. Numbers Only”))