Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Mail merge IF Statements

Posted on 2016-11-10
8
54 Views
Last Modified: 2016-11-11
hi i am trying to do an if statement in mail merge, heres what i am trying to do in non code terms

i have a field called unitprice if this field contains 0 i want to blank it out but if the field desc is not blank i dont want to blank it our i want to keep the 0

how would i do this?

p.s. hope this makes sense
0
Comment
Question by:Jade Laird
  • 4
  • 3
8 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 41882801
You seem to have some typos in your question. I guess that the last few words of your second paragraph: "our i want to keep the 0"  should read "out, I want to keep the field value."

If so, the fields should look like this:
{ If { MAILMERGE unitprice } = 0 "" { MAILMERGE unitprice } }
0
 

Author Comment

by:Jade Laird
ID: 41883410
Yeah sorry for the typos. im not sure that will work, wont i need to consider the field DESC

simpler way to put it i want to always blank out the field unitprice when equals 0 unless field desc is not blank.

wont i need nested if statements.

sorry new to this.
0
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 41883415
HI,

pls try

 { IF { = { IF {Mergefield desc  } = "" 1 0 } + { IF {Mergefield unitprice } = 0 1 0 } } =  2 ""  { MAILMERGE unitprice }  } 

Open in new window

Regards
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:Jade Laird
ID: 41883439
It doesnt seem to work.

example:

DESC     UNITPRICE
                  0
TSHIRT     0

So from the data above where desc is blank unit price needs to be blank, where desc is not blank unit price needs to keep the value
0
 
LVL 50

Expert Comment

by:Rgonzo1971
ID: 41883448
maybe try
 { IF { = { IF {Mergefield desc  } = "" 1 0 } + { IF {Mergefield unitprice } = "0" 1 0 } } =  2 ""  { MAILMERGE unitprice }  } 

Open in new window

0
 

Author Comment

by:Jade Laird
ID: 41883477
Think i may have solved this by doing


{IF{MERGEFIELD DESC} = "" "" {IF{MERGEFIELD DESC} <> "" {MERGEFIELD UNITPRICE}}}
0
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41883480
pls try
{IF{MERGEFIELD DESC} = "" "" {MERGEFIELD UNITPRICE}} 

Open in new window

0
 

Author Closing Comment

by:Jade Laird
ID: 41883482
Thank you!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question