Back to Notenik Docs


The Notenik Knowledge Base

14. Putting It All Together ↑

14.6 Create a Commonplace Book with Lookup Fields

I’ve maintained my own Digital Commonplace Book for years, and one of the challenges with maintaining a collection of notable quotations is the repetition of information from one Note to another: the same author, and even the same work, along with accompanying information, may be repeated numerous times. It is annoying, tedious, time-consuming and error-prone to re-enter that information on each Note, but there is no workable alternative when dealing with only a single flat file (or single Collection of Notes, in our case).

Version 7.0.0 of Notenik,however, introduced Lookup fields, which allow one Collection to reference Notes in other Collections, and we can now use such fields to solve our repetition problem.

And starting with Version 9.2.0 of Notenik, you have an option, when created a new Collection, to initialize it as a Commonplace with Lookups. This is now the best way to start creating your own Notenik Commonplace book.

So, if you haven’t already, I suggest you go ahead now and create a new Collection for yourself, using the Commonplace with Lookups model as your starting point. The rest of this article will then walk through your new Collection to explain how everything works.

In order to understand all the details, it may help at times to make use of a text editor in order to see what’s going on under the hood.

Three Nested Collections

First, we need to understand that our Commonplace book consists of three different Notenik Collections. We might arrange these Collections in a variety of positions relative to each other, but my model implementation has these three Collections nested within one other. The author-notes folder is at the bottom, within the author-works folder, and the author-works folder is within the main folder (however you have named it). There are a couple of advantages to arranging things this way:

So now let’s look at each Collection in turn, starting at the bottom. We’ll look at the Collection Template File for each Collection, since this is where the fields are defined, as well as the relationships between Collections.

You may find it handy to use the Open Project Folder command on the top folder of your new Commonplace book, since this will give you a convenient way to open each of the three Collections in turn.

Author Notes

Here’s what the Collection Template file looks like for the author-notes Collection:

Author: <title> 

Tags: <tags> 

Author Info:  

Author Years:  

Author Link: <link> 

Author Notes: <body> 

Let me comment on this a bit.

Every Collection needs to have a title field and a body field, and it’s generally good to have a tags field as well.

Note, however, that with recent versions of Notenik, it’s enough to have these field types, without having to use these exact labels. So here you can see we’re taking advantage of this flexibility by labeling the first field Author, and the latter field Author Notes.

Author Info, Author Years and Author Link are just additional pieces of information I wanted to record for each author. Your needs and interests may vary.

BTW, you’ll see that I’m entering the author names with first names first: in other words, ‘Raymond Chandler’, as opposed to ‘Chandler, Raymond’. I recommend you do the same, and make this practice consistent.

One other important point is the shortcut assigned to the Collection on the Collection Settings screen. It should be set to qauthors. This is the field that will allow your other Collections to lookup information in this Collection.

Author Works

This is the next Collection, moving up from the bottom of the folder structure. Here’s what the Collection Template file looks like for author-works:

Work Title: <title> 

Tags: <tags> 

Author: <lookup: qauthors> 

Work Type: <worktype> 

Work Minor Title:  

Work Date: <date> 

Work Link: <link> 

Work Id:  

Work Rights:  

Work Rights Holder:  

Publisher:  

Publisher City:  

Work Notes: <body> 

The Work Title field is the one that you will be referencing in order to access this note from your main Collection of quotations, so it is important to give some thought to how this field might be composed. In my case, I’m simply using the Title of the work, and trusting that each separate cited work will have a unique Title, at least for the purposes of my Commonplace book. You might choose to use some other coding system, involving the author’s name and year of publication, for example. Whatever you decide upon, the field must still have a type of title, but you can label it however you would like.

Note that I’m including an Author field here, and making this a lookup field referring back to the Author Notes Collection we just reviewed. You’ll see that I’m using the Collection shortcut of qauthors to tell Notenik where this lookup info may be found.

I’m also using the special Work Type field, to indicate what sort of work (book, interview, essay, etc.) is being referenced.

You may have different informational fields you wish to record about each work; these are just the ones I’ve chosen to use.

If you look at this Collection’s Settings, you should see that a shortcut of qworks has been assigned.

Commonplace Book

And now, finally, we’re ready to look at the commonplace book itself. I’ve called mine commonplace-book, and here’s its template file:

Title: <title> 

Author: <lookup: qauthors> 

Date: <date> 

Tags: <tags> 

Work Title: <lookup: qworks> 

Work Pages:  

Date Added: <dateadded> 

Body:  

The Title field for each quotation is just some brief and meaningful excerpt from the full quotation, which goes in the Body field: just keep in mind that each Note – each quotation, in this case – must have a unique title.

Note that I’m now using lookup fields for both Author and Work Title. I could have skipped the inclusion of Author here, and just pulled it from the Work Title lookup, but I’ve included it explicitly here for a few different reasons.

I’ve also repeated the Date field here, for somewhat similar reasons.

At first glance, the field Work Pages field may seem like information about a work that could be moved to the Author Works Notes, but this is actually meant to call out the pages of the work on which this particular quotation was found, and so remains information about the quotation, and not about the work more generally.

Making Use of Your Commonplace Book

When viewing one of your quotations on the Display tab, you’ll see that both of the lookup fields – Author and Work Title – appear following disclosure triangles (so long as there is some additional info to disclose). Click on one of the triangles, and you’ll see additional info appear that is being pulled from the appropriate Lookup Collection.

You’ll also see that both of the Lookup field values appear as hyperlinks. Click on one of these, and the corresponding entry in the appropriate Lookup Collection will be opened for you, in a separate Collection window. This is handy when you wish to add or edit an entry in one of these Lookup Collections.

Edit one of your quotations, and you will see that the Author and the Work Title both appear as drop-down menus, allowing you to select an existing value from one of these Lookup Collections.

Summary

Lookup fields can be used for many more purposes, but this project should give you some idea about how to implement them in at least one practical, real-world example.


Next: 14.7 Write a Web Book