A family of Microsoft word processing software products for creating web, email, and print documents.
- It's a lot easier to see what's going on if you can press Alt-F9 while displaying your Mail Merge Main Document and see what the underlying field codes actually are. The view that shows the chevrons like this
«Less_Goods_and_Services_Exchng»
does not tell you anything about other aspects of the field code, e.g. it would appear the same whether the underlying field code was
{ MERGEFIELD Less_Goods_and_Services_Exchng }
or
{ MERGEFIELD Less_Goods_and_Services_Exchng # "$,0.00;;" }
- Your original question was to do with ensuring that Less_Goods_and_Services_Exchng displayed as blank/null if it was zero, and the replies you received should have coped with that. But if you have
{ IF { MERGEFIELD Less_Goods_and_Services_Exchng # "$,0.00;;" } = 0 "zero" "something" }
it won't work as you might hope because when
{ MERGEFIELD Less_Goods_and_Services_Exchng } is 0,
{ MERGEFIELD Less_Goods_and_Services_Exchng # "$,0.00;;" } will be "" and will not = 0
So you probably need something more like Jeeped's original suggestion, e.g.
{ IF { MERGEFIELD Less_Goods_and_Services_Exchng } = 0 "Thank you for your donation. No goods or services were exchanged for this contribution. This contribution is deductible to the fullest extent allowable under tax law. Please retain this letter for your records."
"Thank you for your donation. Goods or services were exchanged for this contribution. We estimate that the fair market value of this exchange is { MERGEFIELD Less_Goods_and_Services_Exchng # "$,0.00" }, so your charitable contribution is { MERGEFIELD Total_Contribution # "$,0.00" }. This contribution is deductible to the fullest extent allowable under tax law. Please retain this letter for your records." }
If you also have to deal with the case where { MERGEFIELD Less_Goods_and_Services_Exchng } is blank/null, and you want to deal with that case as if the value is 0, you need something more like
{ IF { ={ MERGEFIELD Less_Goods_and_Services_Exchng } - 0 } = 0 "Thank you for your donation. No goods or services were exchanged for this contribution. This contribution is deductible to the fullest extent allowable under tax law. Please retain this letter for your records."
"Thank you for your donation. Goods or services were exchanged for this contribution. We estimate that the fair market value of this exchange is { MERGEFIELD Less_Goods_and_Services_Exchng # "$,0.00" }, so your charitable contribution is { MERGEFIELD Total_Contribution # "$,0.00" }. This contribution is deductible to the fullest extent allowable under tax law. Please retain this letter for your records." }
(If you also need to deal with negative values of Less_Goods_and_Services_Exchng and negative or zero values of Total_Contribution, you shpuld be able to do that either using the other "branches" of the numeric field switch, or using additional tests. e.g. something roughly like
{ IF { ={ MERGEFIELD Less_Goods_and_Services_Exchng } - 0 } = 0 "Thank you for your donation. No goods or services were exchanged for this contribution. This contribution is deductible to the fullest extent allowable under tax law. Please retain this letter for your records."
"Thank you for your donation. Goods or services were exchanged for this contribution. We estimate that the fair market value of this exchange is { MERGEFIELD Less_Goods_and_Services_Exchng # "$,0.00;-$,0.00" }, so your charitable contribution is { MERGEFIELD Total_Contribution # "$,0.00;-$,0.00;$0.00" }. This contribution is deductible to the fullest extent allowable under tax law. Please retain this letter for your records." }
)