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

Merging data into a single frame


Recommended Posts

Is it possible to merge multiple records into a single frame so that they can be edited?

I have a data merge set up using the data merge layout tool but I need to edit the contents to delete unwanted data and have the other records move up to fill the gaps.

This is proving difficult because of the multiple frames created by the layout tool.

Workaround 1? If it's not possible to have multiple records on a single page without using the data merge layout tool, a way of combining the text from each separate frame into a single frame would be a workaround. 

Workaround 2? Instead of using the data merge layout tool, I tried adding the fields multiple times to a master page but this created duplicate records. Is there a field I could add to advance the record by one?

Context...

Catalogue comprising Name and description followed by multiple records. Note the number of products may vary.

Required output:

Name1
Description1
Product 1 - other fields...
Product 2 - other fields...

Name2
Description2
Product 3 - other fields...
Product 4 - other fields...
Product 5 - other fields...

 

Link to comment
Share on other sites

Workaround3? I exported the results of the data merge to a PDF. I then opened this in a new instance of publisher with these two options set

image.png.d20a3c03287ccb20a6790120c92faf04.png

However rather than being presented with a single frame of text, I was left with multiple text boxes.

Link to comment
Share on other sites

16 hours ago, Catshill said:

Is it possible to merge multiple records into a single frame so that they can be edited?

Do I understand right that your goal is to use APub to edit the contents of an external data source? Note, the Affinity feature is called "data merge" as kind of a data collector, not as an editor (compare an image cataloging app which is different from an image editing app).

What prevents you from editing the data source in its initial file type / with an according editor app?

1 hour ago, Catshill said:

Workaround4 I took the results of the data merge and manually linked each frame. I was then able to select all the text which I was then able to copy into a new document.

I was hoping for a less manual method.

If you insist to involve Data Merge: Have you tried to export the generated result as PDF and to export that as text with an according PDF viewer app?

Or, workaround 5 for specific* file types only: In APub don't use "Data Merge" but menu "Edit" -> "Place" to edit the resulting table, cells and contents in APub.
*works in APub V1 for instance with .xlsx – but not with .xls or .csv.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 only

Link to comment
Share on other sites

I would use Word, as its Mail Merge is specifically created for stuff like that:

image.png.58bdbd160869d58e499c4d04337e512b.png

You could subsequently be able to import such Word document with styles and enhance it in Publisher.

If you do not have Word, you can use LibreOffice Writer to create much the same (by "cheating a bit"):

image.png.030609086203d786e2e4d179925af321.png

After having merged in LibreOffice (and saved as a Word docx to be imported into Publisher), the records are in separate pages but it is an easy job to remove page breaks and have continuous flow.

Either way you get a merge document that has empty fields (rows) removed, and field-specific paragraph formatting that is easy to edit in Publisher.

Link to comment
Share on other sites

On 5/31/2023 at 10:29 AM, thomaso said:

Do I understand right that your goal is to use APub to edit the contents of an external data source? Note, the Affinity feature is called "data merge" as kind of a data collector, not as an editor (compare an image cataloging app which is different from an image editing app).

What prevents you from editing the data source in its initial file type / with an according editor app?

If you insist to involve Data Merge: Have you tried to export the generated result as PDF and to export that as text with an according PDF viewer app?

Or, workaround 5 for specific* file types only: In APub don't use "Data Merge" but menu "Edit" -> "Place" to edit the resulting table, cells and contents in APub.
*works in APub V1 for instance with .xlsx – but not with .xls or .csv.

The data is merged from an xlsx file of about 80 records. It is inserted into APu as part of a brochure and each field is given a text style in APu. In this specific instance and because of the way that data merge works, I need to change the layout (not the data) from the resulting output. That is why editing the source data (or importing text from a PDF) is not appropriate in this instance.

The last suggested option is not appropriate because the outcome is not required in tables but as follows...

image.png.7d9b11e16618340c6f6b822583bc19cf.png

 

I can live with the following...

Use the data merge layout tool on a master page as above with the fields styled using text styles.

Generate the output to a new APu file.

From the resulting output, link each text frame.

Click in the linked text frames, select and copy all the content.

Paste the output into a single text frame and edit to to arrange content (so that Producer and location only appear once) as required...

<Producer 1>                                         <location>
<description>
<No.1> <name1> <type>
<No.2> <name2> <type>
<No.3> <name3> <type>

<Producer 2>                                         <location>
<description>
<No.4> <name1> <type>
<No.5> <name2> <type>

<Producer 3>                                         <location>
<description>
<No.6> <name1> <type>

...

So resulting output is...

Acme Company  Weymouth, Devon
Established by Josiah Wedgewood in 1834, the company have been making furniture since 1960.

[1] Windsor Chair Furniture
[2] Wardrobe Furniture
[3] Wall Light  Electrical

M&S Company  Matlock, Derbyshire
Established by Olivia Smite in 1934 and specialising in modern designs.

[4] Revolving Door Furniture
[5] Stool Furniture

Milliband Hemmingway  Stroud, Gloucestershire
Traditional plumbers with a large stock of supplies.

[6] U Bend Plumbing

 

Link to comment
Share on other sites

On 5/31/2023 at 12:43 PM, lacerto said:

I would use Word, as its Mail Merge is specifically created for stuff like that:

image.png.58bdbd160869d58e499c4d04337e512b.png

You could subsequently be able to import such Word document with styles and enhance it in Publisher.

If you do not have Word, you can use LibreOffice Writer to create much the same (by "cheating a bit"):

image.png.030609086203d786e2e4d179925af321.png

After having merged in LibreOffice (and saved as a Word docx to be imported into Publisher), the records are in separate pages but it is an easy job to remove page breaks and have continuous flow.

Either way you get a merge document that has empty fields (rows) removed, and field-specific paragraph formatting that is easy to edit in Publisher.

I did consider using MS Word to import the data but I have had inconsistent results when importing anything other than plain text from non-Affinity products. Merging Word and APu styles in particular has been problematic but I perhaps could create dummy styles like [Name style] in Word and then use find/replace in APu to turn these into actual styles.

I'll probably go down the Affinity data merge route now as explained above.

 

Link to comment
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

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.