View Single Post
  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nick
 
Posts: n/a
Default Skip Record if Comparison of Several Fields Fails

Sorry to be ambiguous. I have been trying to figure out how I can copy
the mail merge instructions so you can see them, but can't figure it
out, so, I will bite the bullet and type them in.

Data fields include:

ClientPosition (whether our client is the "1","2" or "3" choice or
"FALSE" if not selected)
Issue D rating for 1st choice client (1-5 reported where "1" is most
favorable - up to "4" which is least favorable and "5" is no opinion)
Issue D rating for 2nd choice client
Issue D rating for 3rds choice client

Mail merge does the following:
1. check to see if client position=1
2. checks to see that rating for 1st choice is not null
3. checks to see that rating for 2nd choice is not null
4. checks to see that rating for 1st choice is less than 5
5. subtracts value of 1st choice rating from value of second choice
rating to see if it is less than zero
6. If it is the text is activated. If it isn't it
7. checks to see if client position=2, etc.

{IF {MERGEFIELD ClientPosition } = 1 "{IF {Q2_C2D } "" {IF {Q2_C1D }
"" { IF {Q2_C1D } 5 { IF { = { Q2_C2D } - { Q2_C1D } } 0 "Text
here for client in first position rated lower than competitor in second
position

" "{ IF {Q2_3D } "" { IF { Q2_C1D} "" { IF { Q2_C1D } 5 { IF {
= { Q2_C3D } - {Q2_C1D } } 0 "Text here for client in first position
rated lower than competitor in third position

" "" } } } } " } } } } }{IF {MERGEFIELD ClientPosition } = 2 "{IF
{Q2_C2D } "" {IF {Q2_C1D } "" { IF {Q2_C2D } 5 { IF { = { Q2_C1D
} - { Q2_C1D } } 0 "Text here for client in second position rated
lower than competitor in first position

" "{ IF {Q2_2D } "" { IF { Q2_C3D} "" { IF { Q2_C2D } 5 { IF {
= { Q2_C3D } - {Q2_C2D } } 0 "Text here for client in second position
rated lower than competitor in third position

" "" } } } } " } } } } }, etc.

I'm looking for a way to skip the record if none of the statements
trigger the associated text.

Thanks for looking at this for me.

Nick King