November 20, 200916 yr ValueListIDs ( fileName ) ValueListItems ( fileName ; valueList ) ValueListNames ( fileName ) what are this functions used for ?
November 20, 200916 yr ValueListIDs ( fileName ) [color:blue]FileMaker assigns a unique serial number to every value list you create. This function returns a carriage return delimited list of these serial numbers. Honestly, I've never used this. ValueListItems ( fileName ; valueList ) [color:blue]I use this all the time. So useful! Ever done a Insert > From Index... (Ctrl + I) on a field and wished you could get that list for a script, etc? Well, this is one useful purpose for ValueListItems. Create a new value list that uses values from the field you would like to index. Then call ValueListItems ( "yourFileName"; "yourValueListName" ). It will return all the values in that field (carriage return delimited) without duplicates and without needing a relationship (like List). There are a lot of other purposes for this as well but this is one of my favorites. ValueListNames ( fileName ) [color:blue]This returns the names of the value lists in the file (again, carriage return delimited). Never used this either but I could see it being useful. [color:blue]A note about the parameter "fileName" I usually see people doing this ValueListItems ( Get ( FileName ); "valueListName" ) [color:blue]instead of hardcoding the file name. Of course, if you have multiple files this may not be the result you want. Edited November 20, 200916 yr by Guest
Create an account or sign in to comment