# How to export .bib with the selected fields?

**URL:** <https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712>\
**Category:** Help\
**Tags:** entry-editor\
**Created:** [May 6, 2021, 3:14pm UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712 "2021-05-06T15:14:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![xinhongri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/xinhongri/32/964_2.png) [@xinhongri](https://discourse.jabref.org/u/xinhongri)\
**Post date:** [May 6, 2021, 3:14pm UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/1 "2021-05-06T15:14:26Z")

</div>

I want to export .bib with some selected Fields as I don’t want all the fields such as groups, marks output to a bib file as they are not needed in latex though they maynot be displayed.

---

<div class="post-metadata">

**Author:** ![mlep](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/mlep/32/387_2.png) [@mlep](https://discourse.jabref.org/u/mlep)\
**Post date:** [May 6, 2021, 3:26pm UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/2 "2021-05-06T15:26:50Z")

</div>

You can do this after the export of your selected entries:

- Open the newly-created .bib file.
- Select the menu `Quality -> Cleanup entries`
- Check “Enable field formatters”
- In the drop-down menu at the window bottom, select the field you want to be removed (like Groups — groups is near the botton, I do not know why), and select the action “clear”. Add this combination to the list of cleanup actions by clicking on the “plus” sign (+).
- click on OK

Note the dedicated help file is here : [https://docs.jabref.org/finding-sorting-and-cleaning-entries/cleanupentries](https://docs.jabref.org/finding-sorting-and-cleaning-entries/cleanupentries)

---

<div class="post-metadata">

**Author:** ![xinhongri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/xinhongri/32/964_2.png) [@xinhongri](https://discourse.jabref.org/u/xinhongri)\
**Post date:** [May 10, 2021, 1:10am UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/3 "2021-05-10T01:10:04Z")

</div>

Thank you for your kind reply.  
However, this procedure may cause that some entries can not be used, what I want is to retain this entries, only when I export can I select the entries I want to export. For example, the comments entry I want it retains when I read and don’t want it to export.

Besides, field formatters seem a little uneasy to use.

---

<div class="post-metadata">

**Author:** ![mlep](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/mlep/32/387_2.png) [@mlep](https://discourse.jabref.org/u/mlep)\
**Post date:** [May 10, 2021, 5:52am UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/4 "2021-05-10T05:52:17Z")

</div>

In my mind, the procedure was to be applied on the already-exported entries (i.e. on the new .bib file). Hence, your main bibliographic file remains untouched.  
And once you have set all the fields to be cleared in the clean-up entry dialog window, they are kept there for your next export.

---

<div class="post-metadata">

**Author:** ![xinhongri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/xinhongri/32/964_2.png) [@xinhongri](https://discourse.jabref.org/u/xinhongri)\
**Post date:** [May 10, 2021, 8:23am UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/5 "2021-05-10T08:23:45Z")

</div>

I know the function but it is not I want.  
For example, I have taken notes for an article and save it in the comments. However, I don’t want it to export to a new bib file which is used for a latex. (but I want it remains in the original bib file)  
If it cleans up my notes in the original file it will bring me a lot of loss, I only want to filter it when export the selected entries to another bib file. All the entries will be saved fovever in the original bib file.

---

<div class="post-metadata">

**Author:** ![mlep](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/mlep/32/387_2.png) [@mlep](https://discourse.jabref.org/u/mlep)\
**Post date:** [May 10, 2021, 8:40am UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/6 "2021-05-10T08:40:04Z")

</div>

Sorry for the misunderstanding. To me, it became unclear what your issue is.

I understand you want:

- to keep you main bibliographic file as it is.
- to remove your notes/comments from the exported file.

If so, why cleaning your comments/notes in the exported file does not do the job?

---

<div class="post-metadata">

**Author:** ![xinhongri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/xinhongri/32/964_2.png) [@xinhongri](https://discourse.jabref.org/u/xinhongri)\
**Post date:** [May 10, 2021, 8:59am UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/7 "2021-05-10T08:59:32Z")

</div>

I want:

- to keep my main bibliographic file (eg 1.bib) as it is (with my notes/comments).  
1.bib:  
@Article{2020DvornikImportance,  
author = {Nikita Dvornik and Julien Mairal and Cordelia Schmid and Dvornik, Nikita and Mairal, Julien and Schmid, Cordelia},  
journal = {IEEE transactions on pattern analysis and machine intelligence},  
title = {On the importance of visual context for data augmentation in scene understanding},  
year = {2019},

- to remove your notes/comments from the exported file to get a new file (2.bib).

2.bib:  
@Article{2020DvornikImportance,  
author = {Nikita Dvornik and Julien Mairal and Cordelia Schmid and Dvornik, Nikita and Mairal, Julien and Schmid, Cordelia},  
journal = {IEEE transactions on pattern analysis and machine intelligence},  
title = {On the importance of visual context for data augmentation in scene understanding},  
year = {2019},  
publisher = {IEEE},  
}

- **my notes/commentsmy in main bibliographic file remains the same not like 2.bib.**

**However, when I cleaning your comments/notes in the exported file, 1.bib will be the same as 2.bib.**

---

<div class="post-metadata">

**Author:** ![mlep](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/mlep/32/387_2.png) [@mlep](https://discourse.jabref.org/u/mlep)\
**Post date:** [May 10, 2021, 9:27am UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/8 "2021-05-10T09:27:44Z")

</div>

When you clean your file 2.bib using `Quality -> Cleanup-entries`, only the selected entries of 2.bib should be modified. So, the file 1.bib should remained the same.

Which version of JabRef are you using?  
Could you make a video showing your actions?

---

<div class="post-metadata">

**Author:** ![xinhongri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/xinhongri/32/964_2.png) [@xinhongri](https://discourse.jabref.org/u/xinhongri)\
**Post date:** [May 10, 2021, 1:13pm UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/9 "2021-05-10T13:13:52Z")

</div>

I use JabRef 5.2–2020-12-24–6a2a512  
Windows 10 10.0 amd64  
Java 14.0.2.  
I only have a 1.bib file in the begining and open it, which is the current and base file of jabref.  
Then I want to output a 2.bib file which only has the selected fields I want (for example I don’t want the comments field). So I use your method:

- Select the menu `Quality -> Cleanup entries`
- Check “Enable field formatters”
- In the drop-down menu at the window bottom, select the field you want to be removed (like Groups — groups is near the botton, I do not know why), and select the action “clear”. Add this combination to the list of cleanup actions by clicking on the “plus” sign (+).
- click on OK  
After I gain a 2.bib file with the comments cleaned, 1.bib file has also clean the comments.

Maybe you can tell me to create the same file 2.bib as 1.bib first, then open 2.bib, then do the aboving. I think it is quite inconvenient and easy to get some serious problems like carelessly losing important data when forget to create the same 2.bib file. Maybe it can improves in the furture vesion.

---

<div class="post-metadata">

**Author:** ![mlep](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/mlep/32/387_2.png) [@mlep](https://discourse.jabref.org/u/mlep)\
**Post date:** [May 10, 2021, 1:49pm UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/10 "2021-05-10T13:49:30Z")

</div>

You need to export your entries from file 1.bib to file 2.bib first. And then do the cleanup on the file 2.bib.

---

<div class="post-metadata">

**Author:** ![xinhongri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/xinhongri/32/964_2.png) [@xinhongri](https://discourse.jabref.org/u/xinhongri)\
**Post date:** [May 10, 2021, 1:51pm UTC](https://discourse.jabref.org/t/how-to-export-bib-with-the-selected-fields/2712/11 "2021-05-10T13:51:32Z")

</div>

Hope it can improve in the furture vesion.  
@Siedlerchr
