Separate Field for Last Author

Currently, you can set the author field to display only the first author, which dramatically reduces the width of that column in a pretty useful way. However, not being able to also see the last author (without having absurdly wide columns) is inconvenient, especially when trying to understand which papers are all from a single lab group. Additionally, without a separate field, it isn’t easy to sort a library or group by last author.

It would be very useful if you add a field called Last Author , that auto-populates itself with the last author from the author list. This would be helpful for those in biosciences, chemistry, and many other fields (most fields?) of research where the last author denotes the lab head or PI (usually also corresponding author).

1 Like

I completely agree with this idea. The way we talk about papers in my group, a last author field would actually be significantly more useful than the first author functionality that exists. While this new field should definitely be added to EndNote by the developers, I have created a workaround that can be used in the meantime, though only on Macs.

If anyone wants to use this script, I urge you to back up your library first. It’s worked without any problems for me, but better safe than sorry. The following AppleScript will (possibly only if EndNote is open?) take the last name in the author field of every reference and copy it to the “Custom 8” field, which can then be used as a last author field. You can show the new field in the reference list by adding it under “Display Fields” in the settings, and also change its name to “Last Author”, or whatever you’d like. If you aren’t using EndNote X9, you’ll need to change that bit to whatever version you’re using in the script.

The best way I’ve found to use this is to create a service that can be run from EndNote. To do this, open the application Automator and choose the service template. Change “Service receives selected  text  in  any application” to “Service receives  no input  in  EndNote”. Add a “Run AppleScript” action (it’s under Utilities), and paste the script over everything that’s already there. Save the service as whatever you want it to be called (“Fill last author field” for instance), and it will be added to the services menu item in EndNote. You can also add a keyboard shortcut if you want, by going to System Preferences > Keyboard > Shortcuts. Select Services from the sidebar and find your service. Add a shortcut by double clicking (none).

Finally, go to System Preferences > Security > Privacy > Accessibility and add Automator to apps allowed to control your computer - I don’t think it will work without this step, but I had already enabled this, so I haven’t tested without doing it. Feel free to try without it first.

You’ll need to run this script after you add new references to populate the new Last Author field. The first time I ran it on all my references it took some time, but it’s quick when you only have a few new references with unpopulated Last Author fields.

Here’s the script:

on run {input, parameters}

    tell application “EndNote X9”

        set res to retrieve “all” records in first document

        repeat with myRecID in res

            set current_last_author to field “Custom 8” of record myRecID

            if current_last_author is equal to “” then

                set author to field “Author” of record myRecID

                set last_author to last paragraph of author

                set field “Custom 8” of record myRecID to last_author

            end if

        end repeat

    end tell

end run


This was a great workaround, thank you mabo! Sadly, 6 years later, Endnote developers still have not addressed this.

A note for novices like me who want to utilize this (current 2022)

  • Automator’s “Service Template” is now called “Quick Action”
  • If you copy and paste the code provided by mabo, you have to manually replace all the quotation marks. They paste in as a different, stylized font which isn’t recognized by applescript
  • Tabs pasted in as multiple spaces. I also replaced those, not sure if that had any effect.

After replacing quotations, this script worked for me using Endnote 20 though!