range of merge fields?

H

Heather

I'm pretty sure the answer is already no, but I thought I'd ask...

I have logic to insert into a REALLY big merge. A particular indicator
may appear in one of ten fields that would mean a mismatch in the type
of letter being sent (we're accounting for the chance of human error).
If a mismatch is found, I'm including a big line of text to alert staff
not to mail the letter.

I have this:

{if {mergefield evaluationcd11}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd12}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd13}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd14}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd15}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd16}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd17}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd18}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd19}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}
{if {mergefield evaluationcd110}="FN" {includetext
c:\\master_comment.doc letter_type_mismatch}""}

I don't suppose it's possible to say mergefields 11 through 110 without
needing all of those if statements, is it? The 'FN' code would only be
in one field, but not regularly in, say, cd11 or cd 12.

Thanks in advance for any advice...go live is in two weeks and
counting! :)

Heather
 
D

Doug Robbins - Word MVP

I would suggest that you do the validation on the data source before the
merge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
H

Heather

Yes, that would be the easy thing to do, wouldn't it? :)

Unfortunately, I'm looking at about 1700 columns of data per individual
record, and it's difficult to edit the csv file (don't have excel 2007
and looking at it in a text editor is pretty rough). We'll be getting
daily runs with about 100-300 records to print for about nine months of
the year.

Oh, well! Thanks for the suggestion!

Heather
 
D

Doug Robbins - Word MVP

In that case, I think you are stuck with the If field construction.

Something else that you might consider however is getting the program that
creates the CSV file to replace 1 instead of FN and 0 for the not FN case,
or opening the .CSV file and using edit replace to replace FN with 1 and not
FN with 0 and then use an If field construction on an {= } field that added
all of the mergefields that you want to test together so that if the total
was >0 you the { includetext } would be inserted.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
H

Heather

There's an idea...maybe after the go-live for the software is
completed. Thanks for the tip!

Heather
 
G

Graham Mayor

You can do something very much like that already using calculations in
fields without changing the value - see the section Testing for a value in
one of several fields. at http://www.gmayor.com/formatting_word_fields.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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