Jump to content
Gaspare

Data merge many records into one document

Recommended Posts

I would like to connect the data present in the csv file to obtain the result visible in the Second image?
If I connect the csv file and insert the various fields to the various images, the same record is always displayed as seen in the first image.
Is it possible to insert many records of the same csv file on one page of a document?

screenshot.1310.jpg

screenshot.1309.jpg

Share this post


Link to post
Share on other sites
9 minutes ago, Gaspare said:

Is it possible to insert many records of the same csv file on one page of a document?

Hello @Gaspare,

yes, you do this by using the Data Merge Layout Tool.

First you draw with the tool a grid on your page. On the toolbar you can set columns and rows and even the gutter. Then you add your content (images, text, fields) in the top most left field. This will automatically be repeated across the page.

See screenshot for a visual aid.

Cheers,
d.

data_merge_explained.thumb.jpg.7d5df92fa2f3157fd086b0fecb06bfb3.jpg


Affinity Designer 1.9.2 (beta 1.9.2.1005)   |   Affinity Photo 1.9.2 (beta 1.9.2.1005)   |   Affinity Publisher 1.9.2 (beta 1.9.2.1024)
Affinity Designer for iPad 1.8.4   |   Affinity Photo for iPad 1.8.4

Windows 10 (1809) 64-bit - Core i7 - 16GB - Intel HD Graphics 4600 & NVIDIA GeForce GTX 960M
iPad pro 9.7" + Apple Pencil

Share this post


Link to post
Share on other sites

In your example there is always record 10 of the csv file. I would like to assign to each image a specific record of the csv file.
I have to do many similar documents and I would like to avoid writing all the data, I would like to take them automatically from csv files.
I don't have a table, but many individual text fields.

Share this post


Link to post
Share on other sites
38 minutes ago, Gaspare said:

In your example there is always record 10 of the csv file.

Yes, this is due the fact that I took a screenshot of your design and it was replicated to all other data merge cells.

If you want to merge images via data merge you have to provide a path to the images in your csv. Just add another column to your table with the respective paths to the images (at this early stage of beta it is a little unclear how to note down this path. I assume it is save to write it down like this: "D:\TestingAffinity\datamerge-images-01\Icon-1.png" (without the quotation marks.).

d.


Affinity Designer 1.9.2 (beta 1.9.2.1005)   |   Affinity Photo 1.9.2 (beta 1.9.2.1005)   |   Affinity Publisher 1.9.2 (beta 1.9.2.1024)
Affinity Designer for iPad 1.8.4   |   Affinity Photo for iPad 1.8.4

Windows 10 (1809) 64-bit - Core i7 - 16GB - Intel HD Graphics 4600 & NVIDIA GeForce GTX 960M
iPad pro 9.7" + Apple Pencil

Share this post


Link to post
Share on other sites

Should be self explanatory. You'll have to change the fonts to one you prefer, I used Courier.

my Data Merge.zip


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.6

Affinity Designer 1.9.2 | Affinity Photo 1.9.2 | Affinity Publisher 1.9.2 | Beta versions as they appear.

Share this post


Link to post
Share on other sites

Thanks for the help Old Bruce, but that's not what I need. The texts must be automatically taken from the .csv file and I need 4 text fields and not just one for each player

Share this post


Link to post
Share on other sites
12 minutes ago, Marcos Silva said:

So, does Affinity Publisher allow data merge on Mac as well? Is it true? when did that happen? Or is it just a beta version for Windows as of today November 2020?

Affinity Publisher Customer Beta for Mac has included the Data Merge feature since build 1.9.0.796, released in mid-October.

 


Alfred online2long.gif
Affinity Designer/Photo/Publisher for Windows 1.9.1 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.9.1 • Designer for iPad 1.9.1 • iPadOS 14.4.2 (iPad Air 2)

Share this post


Link to post
Share on other sites
1 hour ago, Gaspare said:

Thanks for the help Old Bruce, but that's not what I need. The texts must be automatically taken from the .csv file and I need 4 text fields and not just one for each player

The preview is limited to one record, unfortunately, but Generate button will produce the output document with all records used.

Share this post


Link to post
Share on other sites
1 minute ago, anon2 said:

The preview is limited to one record, unfortunately, but Generate button will produce the output document with all records used.

Thanks anon2 for the reply.
If I only see one record, how do I know if I have inserted the right record in the right place in the document?

Share this post


Link to post
Share on other sites
46 minutes ago, Gaspare said:

Thanks anon2 for the reply.
If I only see one record, how do I know if I have inserted the right record in the right place in the document?

You should use the Data Merge Layout Tool to set up a 2 x 7 matrix of cards on the page. That way you will define only the first card (as you already did, but it needs to be nested inside the layout object) and the software will replicate that for the other 13 cards. Still only one record will be previewed in all 14 cards on the page, but the generated output will use all records sequentially according to the rules you set in  the Data Merge Layout Tool.

The one record preview is one of the weird Affinity software design decisions which negatively impact usability.

Share this post


Link to post
Share on other sites
4 hours ago, Gaspare said:

This attachment is not available.
Please put the afpub file inside a zip file and attach it again otherwise it cannot be downloaded

It downloads fine for me (and has been downloaded 9 or 10 times in total at this point).

If it's not downloading for you, what are the error symptoms? Have you tried a different browser?


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.9.2.1035 and 1.9.2.1005 Beta   / Affinity Designer 1.9.2.1035 and 1.9.2.1005 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Share this post


Link to post
Share on other sites
3 hours ago, walt.farrell said:

It downloads fine for me (and has been downloaded 9 or 10 times in total at this point).

If it's not downloading for you, what are the error symptoms? Have you tried a different browser?

Same browser same account, I don't know what changed but now I was able to download the file

Share this post


Link to post
Share on other sites

The Data sheet and file can be made to work.....Reuploaded the original file with the addition of a container for the data layout tool. Each cell Contains Background image and 4 txt elements.
Just build the layout in the first cell and it will get repeated to all others.

With regards to the text..Suggest the layout is adjusted slightly to accommodate the variable data..Also you could try and place all the txt into single paragraph box and then apply variable data.
File as below (basic but works!). Generate from the Data Merge Manager  

NB for some reason could note get Apub to recognise the CSV file to deleted and reattached....
also had a crash of APu on second attempt!
File names changed to generate (data merge_edited | import_data) with merged data as results

data-merge_edited.zip


AD 1.9.1.979+ Beta AD 1.9.2.1035 | APh 1.9.1.979 + Beta AP 1.9.2.1035
APu 1.9.2.1035 +Beta Apu 1.9.2 2024

OS:Windows 10 Pro 20H2 OS Build 19042.789 + Windows Feature Experience Pack 120.2212.551.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 20.11.2 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Share this post


Link to post
Share on other sites

Thanks to your help I was able to create my document.
Now I have a question and a problem.
Question: can I also put a url in the images and then insert images from the Internet?
Problem: in the original document I have 49 players, in the csv file 49 records, in the created document only 42 players, see image...

data-merge.jpg

Share this post


Link to post
Share on other sites

This was very informative but I can't seem to get my data source to stay connected. After generating, the .csv file is not in the data manager and there are no fields to choose from. I have uploaded my workspace so you can see. Thanks for any advice as to what I am doing wrong. 

2020-11-24_12-57-13.jpg

Share this post


Link to post
Share on other sites
20 hours ago, Gaspare said:

Thanks to your help I was able to create my document.
Now I have a question and a problem.
Question: can I also put a url in the images and then insert images from the Internet?
Problem: in the original document I have 49 players, in the csv file 49 records, in the created document only 42 players, see image...

data-merge.jpg

Interesting idea for adding images directly from internet..I haven't tried that kind of scenario...most variable data templates rely on locally sourced files and information. Even when using Pageflex or Chili Publisher haven't approached or experienced that technique...Personally I would not recommend it.!. there is a lot that could go wrong...:)

a. the links could be incredibly long with a collection of unacceptable weird characters!..
b. Images tend to be dynamic to accommodate multiple visual platforms
c. They could be easily broken
d. images vary in quality and resolution
e. there could be copyright issue!

I am not sure whether their is a limit on the data layout tool ..and without seeing the files /data structure the second question is difficult to answer...It could be that there is an error in the CSV file.. or a bug APub... or the records are limited in the Data Manager
 

 


AD 1.9.1.979+ Beta AD 1.9.2.1035 | APh 1.9.1.979 + Beta AP 1.9.2.1035
APu 1.9.2.1035 +Beta Apu 1.9.2 2024

OS:Windows 10 Pro 20H2 OS Build 19042.789 + Windows Feature Experience Pack 120.2212.551.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 20.11.2 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Share this post


Link to post
Share on other sites

I understand the problems of images taken from the internet.
in my case the images are all of the same size, quality and are present on my server and are posted by the users of my app.

The csv file should be ok, I made several tests

Share this post


Link to post
Share on other sites
19 hours ago, undercovergypsy said:

This was very informative but I can't seem to get my data source to stay connected. After generating, the .csv file is not in the data manager and there are no fields to choose from. I have uploaded my workspace so you can see. Thanks for any advice as to what I am doing wrong. 

2020-11-24_12-57-13.jpg

The data file (.csv) stays connected to the original file..
You should have a master or template file with the layout | datasheet | variables assigned from the fields panel. Save it before going to the Data Merge Manager and generating the file (save this separately!). The generated file does remove the connected once assembled.
 


AD 1.9.1.979+ Beta AD 1.9.2.1035 | APh 1.9.1.979 + Beta AP 1.9.2.1035
APu 1.9.2.1035 +Beta Apu 1.9.2 2024

OS:Windows 10 Pro 20H2 OS Build 19042.789 + Windows Feature Experience Pack 120.2212.551.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 20.11.2 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Share this post


Link to post
Share on other sites

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

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.