Tutorials & Examples Web-help Blog

Round a field if not empty


#1

Hi
I am trying to round a field if not empty.

not ifempty([FIELD A],roundxl([FIELD A],2))

Thanks


#2

The correct expression would be:

if(not isempty([FIELD A],roundxl([FIELD A],2), empty())

or a shorter form using when():

when(not isempty([FIELD A],roundxl([FIELD A],2))

#3

Thanks.

Not working for me - I will try. Is it because the value can be o?

R


#4

What’s the error?


#5

Thanks, Dmitry.

I used it as a rule and it is working now.

if(not isempty([FIELD A]
then roundxl([FIELD A],2)
Keep original Value


#6

I missed a bracket. The correct syntax is below.

if(not isempty([FIELD A]),roundxl([FIELD A],2), empty())

a shorter form using when() :

when(not isempty([FIELD A]),roundxl([FIELD A],2))

#7

Thanks