A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Merge Field String Match Filtering



 
 
Thread Tools Display Modes
  #1  
Old September 11th 19, 08:19 PM
ken b ken b is offline
Junior Member
 
First recorded activity by WordBanter: Sep 2019
Location: Florida
Posts: 1
Default Merge Field String Match Filtering

Very frustrated as can not make MERGEFIELDs work as every Help message I can find seems to indicate they should.

I'm producing a directory but some people do not want their phone numbers or email info included, so in the directory, Excel DB, I included a field mask called "Hide" with the form of... 1000, 101, 1, etc that is, a "1" in each character position of the listing field that people potentially might not want listed.

So if the DB field order is "email1, email2, cell1, cell2" then a "110" mask would hide the email2 and cell1 listings.

My filter code for say the eMail2 text to be inserted into the Directory is...
{IF{ MERGEFIELD "Hide"} = "*1??" "" {MERGEFIELD eMail2 }}

ALWAYS triggers on the TRUE result so I get "---" printed no matter whether there is a 1000, 100, 1, etc in the DB mask.

I only want the filter to be true when there is a "1" in the 3rd position from the right side of the string without regard to any other "1's" in the data.

The "??" wild-cards seem to be acting more like "*" and I can't figure any way to make it work.

What am I doing wrong?
Ads
  #2  
Old September 24th 19, 08:40 AM
MichaelCPurvis MichaelCPurvis is offline
Banned
 
First recorded activity by WordBanter: Aug 2019
Posts: 2
Default

Quote:
Originally Posted by ken b View Post
Very frustrated as can not make MERGEFIELDs work as every Help message I can find seems to indicate they should.

I'm producing a directory but some people do not want their phone numbers or email info included, so in the directory, Excel DB, I included a field mask called "Hide" with the form of... 1000, 101, 1, etc that is, a "1" in each character position of the listing field that people potentially might not want listed.

So if the DB field order is "email1, email2, cell1, cell2" then a "110" mask would hide the email2 and cell1 listings.

My filter code for say the eMail2 text to be inserted into the Directory is...
{IF{ MERGEFIELD "Hide"} = "*1??" "—" {MERGEFIELD eMail2 }}

ALWAYS triggers on the TRUE result so I get "---" printed no matter whether there is a 1000, 100, 1, etc in the DB mask.

I only want the filter to be true when there is a "1" in the 3rd position from the right side of the string without regard to any other "1's" in the data.

The "??" wild-cards seem to be acting more like "*" and I can't figure any way to make it work.

What am I doing wrong?

I faced the same problem while I was sending some data from my excel sheet to someone's email. That data was related to the edubirdie which you can check over here and whenever I tried to send the data, it merges the all data and I am in stress for this.

Last edited by MichaelCPurvis : September 24th 19 at 08:44 AM.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge with database and filtering osbornauto Mailmerge 1 December 10th 09 08:31 PM
Mail merge and Excel filtering BeetleB Mailmerge 4 November 29th 07 09:05 AM
How to do String Manipulations on a Merge Field? Lynda[_2_] Mailmerge 3 September 14th 07 04:57 PM
VB code for filtering mail merge Bev Mailmerge 4 June 13th 06 10:50 PM
Mail Merge - Filtering data Louise Mailmerge 0 January 31st 05 02:41 PM


All times are GMT +1. The time now is 05:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.