Jump to content
You must now use your email address to sign in [click for more info] ×

Data merge allows fields to set URLs, File locations, Emails and Anchors


Recommended Posts

  • Staff

Apps: Publisher
Platforms: macOS and Windows

You can now include URLs, file locations, email addresses and anchors (anchors new in build 1931) in your data merge dataset and use those fields to create an active link in your merged result.

As an example you could have a data set like this:

image.png

And then set up a data merge layout like below, using those fields:

image.png

Once you have done that you can now select the <Twitter Handle> field and Insert Hyperlink. You will now see when you insert a hyperlink in a data merge document you will get an additional option to take the URL from a data merge field, which will activate a drop down to select which field you want the URL to come from. In this case I want to set the URL to be set to the "Twitter Handle Link" field:

image.png

You can also do the same with a link type of email and set that to = the <email address> field.

So then when you generate the merged result the hyperlinks will dynamically generated to be correct for the record in question. So for example clicking on the @Joe link will take you to https://twitter.com/joe.

image.png

 

Anchors

You can also choose a data merge field link to an anchor in your document. Additionally you can also now create anchors from your data. This gives powerful options enabling you to have links from one record to another. e.g. You could have a record set like this:

image.png

Then insert an Anchor = <Record Anchor> and also create a hyperlink which links to <link to Anchor>, so in this case you could have a link in record 1 which links to record 5, 2 to 6, etc. and then record 5 linking back to record 1, etc.

Insert Anchor dialog now has option to create from a data merge field
image.png

 

Hyperlinks to Anchors can also now be created from data merge fields
image.png

 

 

 

 

 

 

 

Managing Director

Help make our apps better by joining our beta program!


MacBook Pro (16-inch, 2021) / Apple M1 Max / 64GB / macOS 12.0.1

iPad Pro 11-inch 3rd Gen / iPadOS 16.2

Link to comment
Share on other sites

This will be a real time saving feature.

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

This is great. Is there any chance, perhaps in a future version, of being able to add anchors from a merge file too, so that it then becomes possible to include document links (bookmarks) from a merge file? i.e. to be able to generate relative links within the same document (like I've been trying to do in this thread)? 

Link to comment
Share on other sites

  • Staff
On 7/3/2023 at 5:00 PM, PaoloT said:

Can paths to files be relative? For example, something like "..\images\mypic.tiff", meaning going up one level from the AfPub document, and opening the "images" folder?

They probably could actually, might not be for 2.2 but we'll give it some thought.

Managing Director

Help make our apps better by joining our beta program!


MacBook Pro (16-inch, 2021) / Apple M1 Max / 64GB / macOS 12.0.1

iPad Pro 11-inch 3rd Gen / iPadOS 16.2

Link to comment
Share on other sites

  • Staff
5 hours ago, Mooxo said:

This is great. Is there any chance, perhaps in a future version, of being able to add anchors from a merge file too, so that it then becomes possible to include document links (bookmarks) from a merge file? i.e. to be able to generate relative links within the same document (like I've been trying to do in this thread)?

Interesting. Just so I understand, is what you want the ability to create Anchors based on a data merge field, and also an Anchor hyperlink based on a field?

So you could have a record set like this:

image.png

Then insert an Anchor = <Record Anchor> and also create a hyperlink which links to <link to Anchor>, so in this case you could have a link in record 1 which links to record 5, 2 to 6, etc. and then record 5 linking back to record 1, etc?

Feels doable and a sensible suggestion (probably a future update >2.2) - obviously stands the possibility of people merging links to loads of invalid anchors, but assuming your input table is correct then all will be fine (and that is what preflight is for!)

Managing Director

Help make our apps better by joining our beta program!


MacBook Pro (16-inch, 2021) / Apple M1 Max / 64GB / macOS 12.0.1

iPad Pro 11-inch 3rd Gen / iPadOS 16.2

Link to comment
Share on other sites

Yes, exactly that. As a concrete example: if you were generating an exercise book with questions and answers (or a quiz book, or similar), you could have all the answers in one data file merge file, including anchors, and all the questions in another data file, including links to the answer anchors. That way when you generate the final file, each question could link to the relevant answer later in the document. 

Link to comment
Share on other sites

  • Staff
On 7/3/2023 at 5:00 PM, PaoloT said:

Can paths to files be relative? For example, something like "..\images\mypic.tiff", meaning going up one level from the AfPub document, and opening the "images" folder?

So actually I've been told this should already be working. 

When doing the merge for picture frame content we try the field value as 
 * An absolute path
 * A path relative to the data source file
 * A path relative to the document file
 * A URL
In that order and take the first one that finds a file. `..` should also work as long as Publisher has sandbox permission for the folders involved. You will need the correct slash direction for the platform you're working on.

Edit: this is in the case of using a data merge field as the image for a picture frame. Hyperlinks to files currently do not support this relative path, but we are looking at it.

Managing Director

Help make our apps better by joining our beta program!


MacBook Pro (16-inch, 2021) / Apple M1 Max / 64GB / macOS 12.0.1

iPad Pro 11-inch 3rd Gen / iPadOS 16.2

Link to comment
Share on other sites

  • 4 weeks later...
  • Staff
On 7/5/2023 at 7:41 AM, Mooxo said:

Yes, exactly that. As a concrete example: if you were generating an exercise book with questions and answers (or a quiz book, or similar), you could have all the answers in one data file merge file, including anchors, and all the questions in another data file, including links to the answer anchors. That way when you generate the final file, each question could link to the relevant answer later in the document. 

Hi @Mooxo / All - pleased to say we have managed to add data merge anchors to 2.2 in the build released today. Updated description with additional section around Anchors on original post of this thread. Hope this helps.

Managing Director

Help make our apps better by joining our beta program!


MacBook Pro (16-inch, 2021) / Apple M1 Max / 64GB / macOS 12.0.1

iPad Pro 11-inch 3rd Gen / iPadOS 16.2

Link to comment
Share on other sites

4 hours ago, Ash said:

Hi @Mooxo / All - pleased to say we have managed to add data merge anchors to 2.2 in the build released today. Updated description with additional section around Anchors on original post of this thread. Hope this helps.

This is phenomenal - thank you! I've just tried it and it works a treat. Very intuitive, and super flexible. You guys never cease to impress with the work you do on this wonderful suite of tools. Thank you again.

Link to comment
Share on other sites

Inserting a hyperlink from a Data Merge source crashes Publisher as soon as Insert Hyperlinks is checked in the PDF export options...Likewise, if Insert Hyperlinks is already checked from a previous export session then File > Export will instantly crash Publisher prior to the Export Window appearing.

 

Sample Document

Data Merge Crash.zip

 

Crash Report

Affinity Publisher 2 Beta-2023-08-04-115545.ips

 

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

When working with a Data Merge file, once an anchor is added which includes the From Data Merge option, this option is then checked for Anchors that didn't initially include the option when the anchor was set.

When viewing the Anchor properties, unchecking the unwanted From Data Merge option from the anchor selects the anchor text and adds a second unwanted duplicate anchor at the end of the selection.

  • I'm assuming it should be possible to differentiate between anchors that do and don't include the From Data Merge option and
  • I'm assuming that unchecking the From Data Merge checkbox shouldn't add a duplicate anchor

Would those assumptions be correct?

 

I think this may be related to another report regarding duplicate anchors when creating TOCs...

 

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Hi, 

Really enjoying this new feature, thank you! I've created a document using data merge to add anchors and hyperlinks to these anchors, as well as URL links. However, when going to export the document to PDF it crashes as soon as I select PDF from the drop-down list of file types. 

Not sure if this is the same bug as reported above, but happy to provide crash log or any other info if needed. Thanks! 

 

Link to comment
Share on other sites

Hi @RebeccaK and welcome to the forums,

It is indeed the same bug reported above. You will likely find that if Include Hyperlinks is already selected from a prior pdf export then as soon as you select pdf as the export format, Publisher will crash.

If Insert Hyperlinks isn't already selected, then Publsiher will crash as soon as you tick the checkbox for Include Hyplerlinks.

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

Hi @RebeccaK,

I'm afraid I don't know when the next Beta will be released but in general they seem to be released roughly every two to three weeks though that isn't a guarantee that a new Beta release will fix a specific issue but considering this is quite a major bug in as much as it prevents a new feature from working my hope would be that it will be fixed in the next release...

There is also an accompanying list of bug fixes updated with each new Beta release which you may have seen located here...

Affinity Designer 2.4.2 | Affinity Photo 2.4.2 | Affinity Publisher 2.4.2
Affinity Designer 1.7.3 | Affinity Photo 1.7.3 | Affinity Publisher 1.10.8
MacBook Pro 16GB, macOS Monterey 12.7.4, Magic Mouse

Link to comment
Share on other sites

  • Staff

An internal build last week is under test. We will fix some more issues and will likely be pushing a customer beta on Tuesday or Wednesday 

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

  • 5 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.