Mail Merge field script creation

Started by DigiCorn, January 27, 2020, 11:50:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DigiCorn

I have done this in FusionPro with scripts and if/and/then statements but have never done in InDesign. Is there a way through mail merge to author a statement to change the field name? To elaborate, I have a spreadsheet and some names say Telephone, some say Cell and some say Direct. Some people have 2 phones. Some 3. Some 1. If I write the field name in the text box, it will always be there, so other than create a new field in the spreadsheet for each descriptor, I don't know if there's a way.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

delooch

there is an option in the merge panel where you can omit blank fields. it wont print the placeholder if there is no data.  not knowing how the spreadsheet fields are formatted, this may be an option

delooch

wait, is the tel/cell/direct its own column header, or are they data?

DigiCorn

Aware of that. But in the case of only one phone, and it happens to be the one on the bottom, the previous tabs, returns and spaces remain. I think in this case, I have to create a merged file and edit it manually... but it's better than typesetting all that info.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

DigiCorn

this will give you kind of the idea...
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

delooch

can you post a portion of the data file?

DigiCorn

There really wasn't one. I had to piece it together. Basically, the columns are like this:
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

AaronH

I don't think indesign can do it but either with formatting the cells to show "###.###.#### TEL" or concatenating into a new cell would be the only two ways I can think of doing it.
Mac & Windows | XMF | Fiery | Oris

DCurry

#8
You might be able to cobble together a solution using GREP to apply character styles to a specific character. Pick an oddball character that is not being used in any of the data (like a % sign or something) and in the data whenever the phone is blank you would put the % sign. Then the character style would be real small (.5 pt type) and the same red color as the background. Use GREP to apply that style to the % character and it will essentially make the line disappear.

It's a lot of work to set up so you might be better off doing what you're doing and editing after the merge.

**EDIT: I'm having trouble making this work so perhaps just ignore it! I'll play around and see if I can make it happen.

**2nd Edit - Never mind. I misread what the problem was.
Prinect • Signa Station • XMPie

Build a man a fire, and he'll be warm for a night. But set a man on fire, and he'll be warm for the rest of his life!