JavaScript and Creators

Hey there.

Having troubles with creators and my javascript. I'm trying to iterate through my items and change certain author's name.

So this is what I've got.

var creators = selecteditems.getCreators();

for each (var c in creators) {
output c.name;
}


But this gives me nothing. I've looked at
https://api.zotero.org/creatorFields?pprint=1

Which state that name is a valid field. I've also tried .getField('name') but no luck.

.creatorTypeID works (even though its not listed on api.zotero) and gives me the ID, but only prints out for one creaetor. In this particular case I've got a letter with author and recipient. It only shows my the recipient ID (16) not the author.

Any ideas where I'm going wrong? What is the best way to batch update handful of names?

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.