and also like this:
when performing mail merges the letter for the second contact shows undesired blanks or even blank lines.
Is there a way to suppress such blank values within or as lines in GoldMine templates and how can this be applied in a GoldMine Word template?
Usually there are 2 scenarios/examples:
A. Suppress a blank field – e.g. Empty ‘Dear/Prefix’ within one line
B. Suppress a blank line – e.g. Empty ‘Company’ as one line
>> Both can be setup within the GoldMine template via Word with IF statements within the GoldMine Word template.
– The following steps are for Microsoft Word 2010 but apply also for Microsoft Word 2007 or 2013
– on the attachments an avi video (compressed in winrar format – further information available at www.rarlab.com) which may contain a further help where to place the cursor or fields and a sample template created in Microsoft Word 2013 for the below steps are available
– Please keep in mind that this is not the only way this can be implemented, there may be other solutions implemented in your GoldMine templates
– The best is to select a contact record fulfilling the condition so that values can be seen when building the condition and suppression
A. Suppress a blank field – e.g. Empty ‘Dear/Prefix’ within one line
1. Open Microsoft Word and a new blank document (or the document with the already prepared standard text)
2. place the cursor into the area where your fields and suppression shall appear
3. Menu/Ribbon Insert >> Quick Parts drop down >> Field
4. Either from the Category (All) or drill down to Category Document Automation >> select the Field Name If
5. At the right it now appears with the Field codes: IF (with the help text IF Expression1 Operator Expression2 TrueText FalseText)
-> as a condition for our above example: CONTACT1->DEAR<>”” (blank)
-> as TrueText: CONTACT1->DEAR + CONTACT1->CONTACT
-> as FalseText: CONTACT1->CONTACT
NB: the condition can also be reversed (e.g. when the database has only a few records where the Dear/Prefix field is filled
-> as a condition for our above example: CONTACT1->DEAR=”” (blank)
-> as TrueText: CONTACT1->DEAR
-> as FalseText: CONTACT1->CONTACT + CONTACT1->CONTACT
We strongly recommend to follow further instructions step by step as this keeps necessary formats and will Microsoft Word recognize that GoldMine fields are added
6.OK
-> in the upcoming Word part there will appear an Error! Missing test condition message
7. Right click on statement and Toggle Field Codes
-> a field (grey) appears with entry {IF \*MERGEFORMAT}
8. Place Cursor between the IF and \ (there should be 1 blank before cursor and 1 blank after the cursor before the \)
9. Menu/Ribbon GoldMine >> from the GoldMine Fields categories >> Select Contact >> Dear
-> now the Expression1 is added (the best is again to highlight the expression >> Toggle Field Codes until the full expression is displayed – {IF {DDEAUTO GOLDMINE DATA &Dear \* CHARFORMAT\t} \*MERGEFORMAT} )
10. enter operator and expression2: here it should be checked if the field is empty or not, needs to be <> “”
{ IF {DDEAUTO GOLDMINE DATA &Dear \* CHARFORMAT\t} <> “” \*MERGEFORMAT}
11. as TrueText and FalseText: here if Dear/Prefix is not empty the Dear/Prefix field + ” ” (blank) is needed (then followed by the Contact field), if Dear/Prefix is empty the whole part needs to be suppressed via
“”
{ IF { DDEAUTO GOLDMINE DATA &Dear \* CHARFORMAT\t} <> “” “{ DDEAUTO GOLDMINE DATA &Dear \* CHARFORMAT\t}” “” \* MERGEFORMAT}
12 . Directly after we either display or suppress, the Contact field is needed (without the blank as if the Dear/Prefix is filled then the blank is already added otherwise we need to suppress the Blank)
{ IF { DDEAUTO GOLDMINE DATA &Dear \* CHARFORMAT\t} <> “” “{ DDEAUTO
GOLDMINE DATA &Dear \* CHARFORMAT\t \* MERGEFORMAT}” “” \* MERGEFORMAT}{ DDE
GOLDMINE DATA &Contact \* CHARFORMAT}
NB: \* MERGEFORMAT may or may not appear depending on the desired format
13. Browse in GoldMine to a contact having a Dear/Prefix value
14. In Microsoft Word >> highlighting the fields >> right click >> Update Field
>> this will result in
15. Browse in GoldMine to a contact not having a Dear/Prefix value
16. In Microsoft Word >> highlighting the fields >> right click >> Update Field
>> this will result in
17. Save the GoldMine template as usual and verify the behavior
B. Suppress a blank line – e.g. Empty ‘Company’ as one line
We strongly recommend to follow further instructions step by step as this keeps necessary formats and will Microsoft Word recognize that GoldMine fields are added
1. Open Microsoft Word and a new blank document (or the document with the already prepared standard text)
2. Place the cursor into the area where your fields and suppression shall appear
3. Menu/Ribbon Insert >> Quick Parts drop down >> Field…
4. Either from the Category (All) or drill down to Category Document Automation >> select the Field Name If
5. At the right appears now in the Field codes: IF (with the help text IF Expression1 Operator Expression2 TrueText FalseText)
-> as a condition for our above example: CONTACT1->COMPANY<>”” (blank)
-> as TrueText: CONTACT1->COMPANY + a Line Feed
-> as FalseText: Supress the line completely
6.OK
-> in the upcoming Word part there will appear an Error! Missing test condition message
7. Right click on statement and Toggle Field Codes
-> a field (grey) appears with entry {IF \*MERGEFORMAT}
8. Place Cursor between the IF and \ (there should be 1 blank before cursor and 1 blank after the cursor before the \)
9. Menu/Ribbon GoldMine >> from the GoldMine Fields categories >> Select Contact >> Company
-> now the Expression1 is added
{IF {DDEAUTO GOLDMINE DATA &Company \* CHARFORMAT\t} \*MERGEFORMAT}
10. Enter operator and expression2: here it should be checked if the field is empty or not, this needs to be <> “”
{ IF {DDEAUTO GOLDMINE DATA &Company \* CHARFORMAT\t} <> “” \*MERGEFORMAT}
11. True text and False text: here if Company is not empty the Company field + a carriage return or alternatively line break (best to activate Show ALL Formatting signs) is needed (followed by the Address1 field, see 12.), if Company is empty nothing is needed
{ IF {DDEAUTO GOLDMINE DATA &Company \* CHARFORMAT\t} <> “” “{DDEAUTO GOLDMINE DATA &Company \* CHARFORMAT\t}
“\*MERGEFORMAT}
12. Directly after this condition the Address1 field needs to be added (without the line feed because if the Company is filled then the line feed is already added)
{ IF {DDEAUTO GOLDMINE DATA &Company \* CHARFORMAT\t} <> “” “{DDEAUTO GOLDMINE DATA &Company \* CHARFORMAT\t}
“\*MERGEFORMAT}{DDEAUTO GOLDMINE DATA &Address1 \* CHARFORMAT\t}
alternatively
NB: \* MERGEFORMAT may or may not appear depending on the desired format
13. Browse in GoldMine to a contact having a Company value
14. In Microsoft Word >> highlighting the fields >> right click >> Update Field
>> this will result in
15. Browse in GoldMine to a contact not having a Company value
16. In Microsoft Word >> highlighting the fields >> right click >> Update Field
>> this will result in
17. Save the GoldMine template as usual and verify the behavior
Below screenshots show how this appears in a mail merge for both mentioned contact records with the upper part showing simply added all fields regardless if blank or not blank, while for the lower part the suppression was applied