The custom functionsThese are the custom functions you can call directly from your sheets. The function documentation is here and you can find examples of use in Using blister custom functions and you'll need the code described in Blister validation code in your local workbook and a reference to the blister library. The majority of these functions can return a multidimensional array when there are multiple results. IntroductionThese functions are for accessing lists of data held in scriptDB, either associated with the current sheet or from some other script or sheet. The purpose is to be able to have lookup, validation and filtering capability without the need to copy lists between workbooks. A blister list is a table of one or more columns of data. Each column can be accessed by name, or by position (starting at 1). When the list is originally created (see Setting up blister lists) yiu can specify sort order (which column the list is naturally sorted on and descending/ascending). Everywhere you see the argument 'optSortId' below is an opportunity to modify that sort order. So for example you could sort on price/descending to lookup the most expensive item. An optListId argument is where you specify which column of the table/list to operate on. It can be a name (if it was given one at load time) or a column number (starting at 1). optFilterId and optFilterValue refer to filters that can be applied to the list to only include items where a column(optFilterId) has a particular value (optFilterValue) listName always refers to the name of the list to look in. By default this will be in your current workbooks scriptDB. To look in other scriptDBs you just add the project name in front of the list name. I reserve the library blister for global lists I may make available from time to time, so the listname 'blister.currencies' refers to a list named currencies in the scriptdb belonging to library 'blister', whereas 'currencies' refers to the list name currencies in the current script/workbook scriptDB. You can create your own shared scriptDBs and refer to them the same way, through library names. If you want to do this, you need to create a reference to any shared projects in 'manage resources' in your script for it to be accessible, and each shared project must contain a function that exposes its scriptDB like this.
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 >