using iif statement

B

Boots

Hi.
Can I tweak a mergefield contents so that if the field is blank it stays
blank and if it contains a number it adds 1000000 to it?
thanks
 
P

Peter Jamieson

You could try a nested field

{ IF "{ MERGEFIELD myfield }" = "" "" "{ ={ MERGEFIELD
myfield }+1000000 }" }

(all the {} need to be the special field braces you can insert using
ctrl-F9.

That won't work if your field can contain non-numeric text, e.g. " " or
"abc" :)

Peter Jamieson
 
B

Boots

thanks for your response. I tried this
{ IF "{MERGEFIELD Control_Num}" = "" "" "{ ={ MERGEFIELD Control_Num
}+1000000 }" }
but ot deosn;t seem to work. I created the braces using ctrl + f9.

Boots
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top