Batch edit to switch text between fields

I have an unusual request. I use Zotero to manage scientific journal articles for papers and grant writing. Citations downloaded from PubMed default to putting the PubMed ID (PMID) and PubMed Central ID (PMCID) into the "extra" field. For years, I've been moving those into another field (it happens to be "location in archive), so that I could use the "extra" field as a place to put a few keywords for each citation. Then I could sort the entries in the viewing pane by the Extra field, to group papers alphabetically by the keyword.

Today, I finally figured out that I can use a citation style for NIH (national institutes of health) grant proposals so that it includes an additional field at the end, to include the PMID and PMCID (this info is required in some cases for grant submission). See here for those interested:
https://guides.lib.umich.edu/c.php?g=282995&p=6748154

Additionally, all of my collaborators still have their PMID and PMCID info in the Extra field. Therefore, for consistency, I am would love to switch the information between my Extra and Loc in Archive fields, so that we can all use this citation style on collaborative proposals.

I dug around and see that what I am asking for will require "batch editing" and likely a Javascript. Would it be possible to get some help on how to frame a javascript to switch the text between the Extra field and the Loc in Archive field for the entire contents of my library? It is probably over a thousand entries, so I cannot do it manually. Thank you for any guidance you can provide!
Sign In or Register to comment.