Create a value list that uses the values from a field. The you can access those values in a calculation like so
ValueListItems ( Get ( FileName ) ; "your_value_list_name" )
Is this what you're looking for? I wan't sure based on background you provide, it seems you already are onto this.
Thank you, logicurio: works like a gem!
Created a separate table for the indices.
Another way that is more flexible - in case there are several fields (indices) that need to be worked upon:
Use the List function across a relationship together with a Custom Function that removes duplicates from a list of values. The advantage being reusability since you would not need to hard-code value lists.
Yes, using ValueListItems is the usual way. However, it may run into heavy performance problems and also limits if the database (i.e. the field index) is very large. Remember also that a variable can store at maximum 1 billion Unicode characters (or 2 GB).
At least until FM 11, performance when looking up the index with Cmd-I was slow for large indexes, especially in a hosted environment, where it could take several seconds to minutes depending on network bandwidth.
This has changed with FM 12, AFAIK; e.g. type-ahead and looking up index values should run faster since FM now just delivers the chunks required by the user. However, I'm afraid that with ValueListItems, again the whole index must be sent.
This has changed with FM 12, AFAIK; e.g. type-ahead and looking up index values should run faster since FM now just delivers the chunks required by the user.
We'll have to see how this performs in practice. The notes I read this morning said that value lists would deliver the first 100 items and then provide a "show more" link. When the user chooses to show more the full list is delivered.
Also, type ahead does not work with Go.