Round a field if not empty

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

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

Thanks

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

Thanks.

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

R

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

Thanks