I am trying to create a way to keep track of a deck of flash cards I am creating. The cards will each have a letter sound (and the location of that letter sound in a word) associated with them. For example:
- fish - beg f
- face - beg f
- dress - end s
- snail - beg sn
I have two forms Card_List and WordsSounds which is a list similar to the one above... just much longer.
When you enter the Card Sound on to the Card_List I would like it too look up all the words from WordsSounds that match that sound, then up to five (or more) of those words could be selected from checkboxes. For example beg f would return fish and face from the list above, then I could select fish, or face, or both fish and face.
I have tried two different ways to do this, but cannot figure out either.
The first is lookup fields let you specify a criteria. The script below has the it specified as "beg f" in the Front_Words field. What I cannot figure out how to do is how to change the criteria depending on the user input for CardSound. It seems to be an issue of scope... I don't seem to be able to use a value from the Card_List form in the WordsSounds. I tried creating a variable set to the value of the CardSound, but I cannot seem to access it this way:
CardSound ( displayname = "Card Sound" type = text on user input { soundMatch = input.CardSound } ) Front_Words ( displayname = "Front Words" type = checkboxes values = WordsSounds[Sound == CardSound].Word )
This script will not let me save and gives the error nul
The other method I have tried is similar to what is described in these forums about autofilter picklists or dynamic picklists. This does not work either because I am using checkboxes which is a stringlist and causes a type mismatch.
Is it possible to autofilter checkboxes?
The first method above seems to be the more elegant solution... Is there a way to specify the criteria dynamically?
Or should I try something else?
Thanks,
Dan