Delete missing fields in Data Merge

Community Beginner ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

I have a business card template set up to pull in data from a TXT file.

The card has captions for the fields: ex  DIRECT:    MOBILE:   etc

If a record in the TXT file does not have a value for one of those fields, how can I delete the caption and move up the empty line?

Example merged data:

John Smith

123 Main St.

Anytown, USA

Direct:  *He does not have a DIRECT phone number so need to delete the caption and move the next line up

Mobile:  888-777-8888

jmsith@gmail.com

TOPICS
Import and export

Views

33

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

Hi Barry,

best show a screenshot with hidden characters visible, also with frame edges visible of the result of a merge where you see the issue.

 

Thanks,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

Here is the templae and the resulting merged file. As you can see the DIRECT field is empty so I'd need that caption skipped and the lines below that moved up.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

LATEST

Thanks. Hm. It remains to be seen if the DIRECT field is really empty or if there are remnants of the merge that could be FEFF special characters. I could identify them if hidden characters are visible. Please add another screenshot where hidden characters are visible and please zoom a bit more in so that we could see them clearly.

 

Choose menu Type > Show Hidden Characters

 

It should be possible to delete paragraphs that contain : followed by a blank, followed by an end-of-paragraph character with one or two find/change actions, but we first have to see the whole picture.

 

Another idea:

Provide the data source with a unique value if there is no entry. E.g.:

[EMPTY]

So we could find/change the whole paragraph that contains [EMPTY] and replace it with nothing.

 

GREP find:

^.+\[EMPTY\]\r?

 

GREP change:

do not enter anything in the change field.

 

Thanks,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines