Clearing Merge / Database fields

Discuss the word processor
Post Reply
MPEcho
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm

Clearing Merge / Database fields

Post by MPEcho »

Greetings,

I have several documents that contain "mail Merge" fields that are filled from a database. As they currently exist, the documents have been saved following "data to fields" so the .odf file displays the contents of the last version. This is OK with me for my in house use. But now I want to share the document as an example without showing any of the confidential information in the fields.

Is there a way to instruct Writer to clear the field contents? The only method I have been able to come up with so far is to create an complete dummy record and fill and save with that. Seems a bit of a kludge to me.
Libre Office 5.1.6.2 Ubuntu 16.04
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Clearing Merge / Database fields

Post by acknak »

Maybe there's a shortcut, but it would surely work to add a new, empty record to the data source, select it and use "data to fields" again.
AOO4/LO5 • Linux • Fedora 23
MPEcho
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm

Re: Clearing Merge / Database fields

Post by MPEcho »

acknak wrote:Maybe there's a shortcut, but it would surely work to add a new, empty record to the data source, select it and use "data to fields" again.
It probably would as long as the table index fields were populated, but the data sources are queries. So a completely blank line doesn't work, nothing to select before trying to fill. Thanks anyway.
Libre Office 5.1.6.2 Ubuntu 16.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Clearing Merge / Database fields

Post by Villeroy »

Store the "fresh" document as a template and fill the data into new documents. WHen closing the a new document you can decide to save or discard.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
MPEcho
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm

Re: Clearing Merge / Database fields

Post by MPEcho »

Villeroy wrote:Store the "fresh" document as a template and fill the data into new documents. WHen closing the a new document you can decide to save or discard.
Thanks. That would definitely have been the correct way to handle the issue. But saving as a template now stores the filled fields. I'm trying to clear up after sloppy practices.

We're it just one or two documents, I could remove the filled fields, replace with the same, and save as a "fresh" template. Alas, I have dozens of documents, each with dozens of fields.
Libre Office 5.1.6.2 Ubuntu 16.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Clearing Merge / Database fields

Post by Villeroy »

But saving as a template now stores the filled fields.
Store the template with new, blank fields via File>Templates>Save...
Alas, I have dozens of documents, each with dozens of fields.
1. Load a new document via File>New>From Template... [Ctrl+Shift+N]. Now you have a new document with new, blank fields. The title bar reads "Untitled 1".
2. Pick your record in the data source window and fill data into fields.
3. Print, export, do whatever you need to do with the filled document.
4. When you close the new document you have to decide if save it as an ordinary text document (.odt) or discard all changes.

When you start again with step 1. you get another new document with new, blank fields titled "Untitled 1".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
MPEcho
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm

Re: Clearing Merge / Database fields

Post by MPEcho »

Villeroy wrote:
But saving as a template now stores the filled fields.
Store the template with new, blank fields via File>Templates>Save...
Thank you. I do understand that method. I agree that it is correct. i agree that is the best way to handle it. But to create templates without some version of my data in the fields requires starting from a new form as I suggested. It is a lot of work for so many forms ant that is what I am trying to avoid.
Libre Office 5.1.6.2 Ubuntu 16.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Clearing Merge / Database fields

Post by Villeroy »

Then edit the template and save it with a dummy record.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
wilbaker
Posts: 1
Joined: Wed Dec 06, 2017 5:41 am

Re: Clearing Merge / Database fields

Post by wilbaker »

I use LibreOffice but the technique I use to restore field names is to Edit-Exchange Database. When doing so, the field names return and extinguish that data I didn't want others to see. Then, simply Edit-Exchange Database back to the original database. Save as template and there you go! I assume it will work in AOO as well but, if it doesn't, you could use LO to at least recover the "clear" template.

Take care,
Wil
LibreOffice 5.1.6.2 Unbuntu 16.04 LTS
Post Reply