June 28, 200520 yr Can you please help me! I have 5 numeric textboxes in total. Textboxes are called testone, testtwo, testthree, and testfour. They should give me a sum on textbox 5 which i called "sum". The sum textbox should only be totaled if 1, 2, 3, and 4 have a numeric value. If any of the 1, 2, 3, or 4 textboxes have an empty value, then the 5th textbox (sum) should remain empty. In other words, My 5th textbox should only sum up if all 4 textboxes have a value!!!Thanks. How should i write my calculation and where?
June 28, 200520 yr If your 4 fields are defined as number, create your fifth field as a calculation, result number and enter in the calculation box : Case ( not (IsEmpty(FieldA) or IsEmpty(FieldB) or IsEmpty(FieldC) or IsEmpty(FieldD)); FieldA + FieldB + FieldC + FieldD ; "" ) This will return an empty result ("") if any of the fields is empty, and the sum of all fields if none of the fields is empty. Note that the ";" can also be a "," depending on your language settings. HTH, Peter
June 28, 200520 yr There are several ways of making this work, but here is one idea - Case ( not Isempty ( Filter ( Box1; "0123456789" ) ) and not Isempty ( Filter ( Box2; "0123456789" ) ) and not Isempty ( Filter ( Box3; "0123456789" ) ) and not Isempty ( Filter ( Box4; "0123456789" ) ) and GetAsNumber (Box1) + GetAsNumber (Box2) + GetAsNumber (Box3) + GetAsNumber (Box4) ) The evaluation part make sure that the first four fields have some kind of number in them, and then adds them up if true. If the 5th box won't be entered into by the user, you could make #5 a calculated field. If so, maybe a auto-enter would be in order.
June 28, 200520 yr Or Case ( Count ( testone ; testtwo ; testthree ; testfour ) = 4 ; Sum ( testone ; testtwo ; testthree ; testfour ) )
July 5, 200520 yr Author Hi Peter, Thank you so so so much, i greatly appreciate it. Thank you very very much. Bless your heart. Maria Tique
July 5, 200520 yr Author Thank you very very much for your effort and time. Thank you. Bless your heart.
Create an account or sign in to comment