Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

num to text 1

Status
Not open for further replies.

pgtek

Programmer
Sep 28, 2001
1,180
0
0
CA
hi
i have this grade level and it's int
i want this formula
if
{TestInstance.gradelevel} = 0
then "KINDERGARTEN"
else
{TestInstance.gradelevel}
i get error string required
when i change it to
if
totext({TestInstance.gradelevel)} = "0"
then "KINDERGARTEN"
else
totext({TestInstance.gradelevel})
i get this 0.00 instead of KINDERGARTEN
what i'm i doing wrong

thanks

pg

pgtek
 
try totext({TestInstance.gradelevel)} = "0.00"

totext will put 2 decimal place unless you tell it not to :

totext({TestInstance.gradelevel),2} = "0
 
Just so you know, the format can change depending upon the system it's installed on, so the following will always resolve:

if isnull({TestInstance.gradelevel})
or
val({TestInstance.gradelevel}) = 0
then "KINDERGARTEN"
else
val({TestInstance.gradelevel})

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top