Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Beginner here...trying to make HasValue(field) null if equal to zero...any suggestions?

Avatar

Level 1

HasValue(PointsQuestion1) + HasValue(PointsQuestion2) + HasValue(PointsQuestion3) + HasValue(PointsQuestion4)

+ HasValue(PointsQuestion5) + HasValue(PointsQuestion6) + HasValue(PointsQuestion7)

+ HasValue(PointsQuestion8) + HasValue(PointsQuestion9) + HasValue(PointsQuestion10) + HasValue(PointsQuestion11)

I would like this (field 1) to be nulled out when equal to zero. can anyone please help?

Also, When I divide Field 2 by field 1, it calculates, but I still get a error message upon opening the PDF. Is it because field 1 is equal to zero (and you can't divide by zero)?

picture.JPG

I want the zero in the middle box to not show up. Any help is appreciated. I can't figure it out.

1 Accepted Solution

Avatar

Correct answer by
Level 7

To get rid of the zero you just put an if statement in something like (in formcalc):

if ($ == 0) then

$ = ""

endif

You do a similar thing for the calculation with the error:

if (Field1 <> 0 and Field1.isNull == 0) then

$ = Field2 / Field1

endif

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

To get rid of the zero you just put an if statement in something like (in formcalc):

if ($ == 0) then

$ = ""

endif

You do a similar thing for the calculation with the error:

if (Field1 <> 0 and Field1.isNull == 0) then

$ = Field2 / Field1

endif