Avatar

Level 7

Milly,

There are a couple of ways to deal with the lower case issue:


1) if you want the "grade" field to convert it so it always displays the upper case:

///////////////////////////////////////////////////  Without + or - grades Put this on the "exit" event of the grade field using formCalc

$ = Upper($)

//////////////////////////////////////////////////// With + or - grades then put this on the "exit" event of the grade field using formCalc

var letter           =  Upper(Substr($,1,1))

var plusMinus   = ""

if      (Len($) > 1)     then

     plusMinus = Substr($,2,1)
endif

$ = letter + plusMinus

//////////////////////////////////////////////////////

2) if you just want the script to work regardless whether its upper or lower (and don't care how the grade is displayed in the "grade" field):

//////////////////////////////////////////////////// With + or - grades   --   Change your existing script to this:

     if     (Substr(Upper(grade),1,1)   <   "F")      then

          $ = 3

     else

          $ =  0

     endif

/////////////////////////////////////////////////// Without + or - grades --   Change your existing script to this:

    if     (Upper(grade) < "F")      then

          $ = 3

      else

          $ = 0

     endif

//////////////////////////////////////////////

You need to do #1 above or #2 above  -- not both

Finally, in the "Object" pallet for your grade field, check the box "Limit Length" to "2" Characters if you use + or - grades and "1" Character if you don't.

Good luck!

Stephen