In Using blister custom functions I showed examples of how to lookup scriptDB lists as custom functions. Here's how to create lists.
In each case, to access lists in your sheet you need to add a reference to the blister library, and make a local copy of the custom functions, as described in GAS lists and validation. Once you have the blister reference you can use the library code to make your own blister lists.
The most likely way of getting data into scriptDB is to populate it from a spreadsheet. Let's start with a simple example - You'll find this in the blister test spreadsheet.
It starts like this
Let's say that we want to load this list to a scriptDB local to the current spreadsheet, and that the list was in a sheet called currencies. This code would load it.
You could now use the custom functions to access data from that list. Test it by entering
in an empty sheet. This will bring in the 3 columns of data in this list, sorted in country name order.
Of course the point here is to be able to share data across multiple sheets from a single scriptDB. I've decided that this currency list is so common, that everyone in the world might need to use it. So I'll load it into the blister library, which is one that I'm going to add useful things to for everyone to use.
The only difference in the code is that I'm writing to a different scriptDB. So now anybody in the world (who has included the blister library and custom functions), can now access this list in their spreadsheet, as follows, by prefixing the list name with the library name.
This means that this list can now be maintained in one place, but be available to everyone.
Lets say that your version of currencies you loaded to your local sheet was needed by some other sheet. Lets say that your sheet and library was called group. Any authorized person could now access this list simply by including the blister library and functions, plus your library in their sheet and accessing it like this
Of course you can use all the functions described in Using blister custom functions for sorting, filtering, matching, looking up and so on without ever needing to have the list in your sheet.
All comments, suggestions, assistance, good lists are welcome as I develop this capability. You can get me on Google plus, Twitter or this forum.
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Things that have been deprecated > GAS lists and validation >