Skip to main content
Solved

Formula-Numeric Field Returning Null Instead of 0

  • November 18, 2024
  • 0 replies
  • 209 views

Forum|alt.badge.img+5

Hello:

My current formula-numeric field returns null, instead of 0.

How could I tweak the formula below to return 0? 

Please note:

A. The numeric fields below have the "treat blank values as ''0' in calculations" enabled:

  1. GPA - Associate Degree
  2. GPA - Bachelor's Degree

B. The Primary Program Name and Secondary Program Name are text fields.

*********************************************************

var number AssociatesDegreeScore = If([GPA - Associate Degree]>=3.3, 2);
var number BachelorsDegreeScore = If([GPA - Bachelor's Degree]>=3.3, 3);

var number FinalScore = If(
    not IsNull([GPA - Bachelor's Degree]), $BachelorsDegreeScore,
    not IsNull([GPA - Associate Degree]), $AssociatesDegreeScore,
    0
);

If([Primary Program Name]="Nursing, Associate Degree - LPN to ADN Option (A45110L)" or [Secondary Program Name]="Nursing, Associate Degree - LPN to ADN Option (A45110L)", $FinalScore)*1.5

*********************************************************

Thank you,

Roula

Best answer by MarkShnierYou

Try this

var number AssociatesDegreeScore = If([GPA - Associate Degree]>=3.3, 2,0);
var number BachelorsDegreeScore = If([GPA - Bachelor's Degree]>=3.3, 3,0);

var number FinalScore = If(
   [GPA - Bachelor's Degree]>0, $BachelorsDegreeScore,
   [GPA - Associate Degree]>0  , $AssociatesDegreeScore,
    0
);

If([Primary Program Name]="Nursing, Associate Degree - LPN to ADN Option (A45110L)" or [Secondary Program Name]="Nursing, Associate Degree - LPN to ADN Option (A45110L)", $FinalScore)*1.5

 

 

MarkShnierYou
Forum|alt.badge.img+24

Try this

var number AssociatesDegreeScore = If([GPA - Associate Degree]>=3.3, 2,0);
var number BachelorsDegreeScore = If([GPA - Bachelor's Degree]>=3.3, 3,0);

var number FinalScore = If(
   [GPA - Bachelor's Degree]>0, $BachelorsDegreeScore,
   [GPA - Associate Degree]>0  , $AssociatesDegreeScore,
    0
);

If([Primary Program Name]="Nursing, Associate Degree - LPN to ADN Option (A45110L)" or [Secondary Program Name]="Nursing, Associate Degree - LPN to ADN Option (A45110L)", $FinalScore)*1.5