Feb 27 2022 05:09 PM - edited Feb 27 2022 05:13 PM
Hello,
I am a novice user and dont have much experience with mail merge.
I have poked around on the internet for how to use the IF in mail merge.
What I want to do:
Hide a field and the related text if the field it is blank.
Below is what I have and in preview results it does seem to hide if SWIFT is "" but when I unclick the preview results I no longer see the fields there. They are completely gone and I dont know how to bring it back.
{ IF «SWIFT» <>"" SWIFT: «SWIFT» }
How do I bring back the fields?
I also need to remove that row completely IF "" and think I might need to add /b possibly? I also read that there could be a conflict with \b and IF so I am not sure about how to remove the line completely so there are no blank rows
Note: I have read that you have to follow certain steps and can not type in teh chevrons or the brackets (must hit Control F9 to wrap in brackets). For the <> I am simply typing it in and assume that is the way to do it.
Grateful for the help.
Feb 28 2022 04:16 PM - edited Mar 02 2022 08:44 PM
@Tony2021 I assume that you have used CTRL+F9 to insert the field delimiters and that you have used ALT+F9 to toggle off their display. When the field codes are not displayed, you will not see anything unless you use the Preview Results facility.
To have it so that the paragraph does not appear, set up your document as shown below:
[Text of preceding paragraph.{ IF «SWIFT» <>""¶
SWIFT: «SWIFT»" }¶
[Text for following paragraph.]
Press the Enter key where the pilcrows (¶) appear in the above field construction.
Feb 28 2022 06:32 PM
Hi Doug and thank you for the response.
I want to make sure I am doing this correct.
I press enter key as instructed but I dont see that paragraph character anywhere and when I preview the blank space is still there.
here is a screen shot:
The yellow shade is where the field that will be hidden when ""
Here is the output. You can see the space where the SWIFT is ""
Feb 28 2022 08:32 PM
@Tony2021 Turn on the display of non-printing characters by clicking on the Pilcrow button in the Paragraph section of the Home tab of the ribbon.
The following shows the field construction that you require:
Mar 01 2022 03:43 AM - edited Mar 01 2022 06:49 PM
HI Doug, thank you for the response. I have a follow up.
Wouldnt the above put the Account No and SWIFT on the same line if they are both NOT "" ?
I followed as described and it seems to be the case. I think we are on the right path but I am probably not following but maybe a little more info will help.
I am needing a separate line for each field and if "" then push the one below up into that space. I hope it makes sense.
thank you very much.
below yellow shaded is what I edited it to based on response above:
Notice that I have a SWIFT line below it that performs as intended but only if its "" then I need it to be removed completely and the ABA below it to be pushed up into its place and therefore no spaces between Account No and ABA if swift was "". I hope it is not confusing.
here is the output for that yellow shaded line above (No and SWIFT are on the same line)
thank you Doug. Looking forward to your response.
Mar 01 2022 11:52 AM
Solution@Tony2021 The field construction that you are using is NOT the same as the one in my response
It will create new lines for the SWIFT and\or ABA if those fields contain data.
Mar 01 2022 07:34 PM
Mar 01 2022 11:52 AM
Solution@Tony2021 The field construction that you are using is NOT the same as the one in my response
It will create new lines for the SWIFT and\or ABA if those fields contain data.