Round a field if not empty

I am trying to round a field if not empty.

not ifempty([FIELD A],roundxl([FIELD A],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))


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


What's the error?

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

1 Like

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))