Google-sheets – Link in Google Sheets to either create a new document or link to the one that was previously created

google sheetsworksheet-function

I'd like to provide a column in a spreadsheet that allows the user to create a note for the column by clicking on a link. If the note has never been created, it will create the link to a new document in a specific folder, otherwise it will link to the previously created document.

Any ideas? Can I do this without JavaScript, or do I need to dive deep?

Best Answer

This requires pretty deep diving. A script would have to check the existence of files to begin with, using the Drive app. Even invoking a script by a link inserted in a document takes a bit of coding; it's better to use custom menu commands for this. This is a kind of project that would make me think whether I'm using a right tool for the job.

Google Sheets have two built-in annotatation tools: comments and notes (see here for comparison of their functions). These do not exist separately from the spreadsheet, but I'd consider this a plus, because linking data based on the name and location of a file is not particularly robust data management.