Over a year ago I wrote a ‘Tips & Tricks’ post about converting text to unique lists that can be used as tags in the “Valid if” part of an Enum or Enumlist column. This is now an important function of the vocabulary app that I have put on my portfolio page under the name ‘Kankaku’:
In my app, users select among a list of tags that has been culled from the tag column of all of the records spreadsheet. That produces a slice of the records that contain the tag. Users can put more then one tag in the tag column, separated either by a space and/or a comma. The interface looks like this:
The post was intended to be useful to others but I wound up getting a lot of help in working out some bugs that cropped up. Unfortunately, that forces readers to plow through a lot of discussion. So, I thought I’d post again in order to point people directly to the conclusion.
In this part of the thread, I write as follows:
I’ve learned through trial and error that when one is preparing a list of data for the “Valid if” part of an Enum or Enumlist column, it’s generally better NOT to try to use a series of virtual columns. I tried that and kept getting inexplicable errors. It seems that it’s better to come up with a single expression that one can put into the “Valid if” slot directly, even it the expression winds up being pretty complicated.
So, the ‘tip’ I’d like to share here is to avoid a series of nested virtual columns of the list type. I’m not sure if such a series will still produce the errors I encountered but it’s still probably safer to put everything into one expression.
Finally, the expression I put in the part of the thread I’m quoting here is pretty much what I have in my app now. It’s been working very well for about a year. So, if anyone else is interested in making record tagging part of your app, you might want to take a look.