barbBear Posted December 6, 2023 Posted December 6, 2023 Hello, I have looked through the support material online. I'm trying to data merge envelope addresses. Some addresses have multiple lines and some don't. I have broken up the data into multiple fields. Address1 Address2 I would like address 2 to be omitted if there is no content; that includes the return/linefeed character. I have used this in Quark and InDesign. They have a check button to omit blank fields (and the return character). Is this available in Affinity? Best wishes, Barb. Quote
walt.farrell Posted December 6, 2023 Posted December 6, 2023 20 minutes ago, barbBear said: Is this available in Affinity? Unfortunately, no. If, rather than a blank field, you could put some pre-defined text in the field, you could fix up the generated file later using Find and Replace. For example, if you used @@@BLANK@@@ when the field was blank, then you could do something like this after running the Merge: Find: @@@BLANK@@@. (make sure the Find options are set to Regular Expression, and use the Regular Expression option "Dot matches Paragraph Break" and then empty the Replace field. Find will find them all, and Replace will replace each one that you want to (or Replace All will replace all at once). Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
Old Bruce Posted December 7, 2023 Posted December 7, 2023 I messed about with this quite a while back and can only dimly recall the steps. The following comes with many caveats. First you need to find both the longest and shortest string of text in each of the Address 1 field. This is to give a Frame Text Text Frame its width, we don't want a Text Frame that is too wide nor do we want one too narrow. Place the <Address 1> field and then a Tab (set tabs to a zero width) and then the <Address 2> field and now a paragraph return or new line. This will (most often) bump the <Address 2> field down to a new line. If there is no second field then the tab and return will result in one line then a second for the third line. <Address 1><tab><Address 1><return or line break> <third field> Resulting in <Apt one> <123 1st street> <Anytown> Apt one 123 1st street Anytown or <Apt one> <NOTHING HERE AT ALL> <Anytown> gives Apt one Anytown or <NOTHING HERE AT ALL> <123 1st street> <Anytown> gives 123 1st street Anytown Quote Mac Pro (Late 2013) Mac OS 12.7.6 Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that.
barbBear Posted December 7, 2023 Author Posted December 7, 2023 THAT is some creative problem-solving. Thanks. : ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.