Creating Books with Notes attached in JavaScript
Hey,
I have zero experience working with Java, what I am trying to do is build code that I can edit & run when I want to add a book into my database with notes attached to it.
So for example I just want to run a code that will create "book" and have it already have a number of child notes already created with titles.
I do this to layout chapters in a book so I can add to them from my app when I am pulling information out. So far I figured out how to create a book in Java but can't figure out the adding notes to it part:
var item = new Zotero.Item('book');
item.setField('title', 'Example Title');
item.setCreators(
[
{
firstName: "Your",
lastName: "Mother",
creatorType: "author"
}
]
}
);
var itemID = await item.saveTx();
return itemID;
save()
That is what I got so far from the website. Please help!
-SaL
I have zero experience working with Java, what I am trying to do is build code that I can edit & run when I want to add a book into my database with notes attached to it.
So for example I just want to run a code that will create "book" and have it already have a number of child notes already created with titles.
I do this to layout chapters in a book so I can add to them from my app when I am pulling information out. So far I figured out how to create a book in Java but can't figure out the adding notes to it part:
var item = new Zotero.Item('book');
item.setField('title', 'Example Title');
item.setCreators(
[
{
firstName: "Your",
lastName: "Mother",
creatorType: "author"
}
]
}
);
var itemID = await item.saveTx();
return itemID;
save()
That is what I got so far from the website. Please help!
-SaL
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.
Upgrade Storage