You need some quotes here to get what you need. Correct syntax if you type in the name of your file is:
ValueListItems ( "FileNameinquotes" ; "ValueListNameinQuotes" )
If this function call is used in the same file where you have defined the value list, it's better to use:
ValueListItems ( Get ( FileName ) ; "ValueListNameinQuotes" )
As this will allow this function to work correctly even if you change the name of your file.
I did do the first already, which was accepted but the second syntax were I substituted “inQuotes“ with the correct name of the valuelist, said “field not found”?
Sorry, just seen the light. I have to put it in between quotation marks. Thanks you.
But why is this not mentioned in all the handbooks and training series I have?
If it is in quotes, you will not get "field not found"
FileMaker is attempting to evaluate each parameter as an expression. If you put the names in quotes, the quotes keep them from being evaluated. If you leave out the quotes, filemaker attempts to evaluate them and thus will attempt to treat the text you entered as a table and field name combination. When no such table name is found, you get that error message. The value list name must be enclosed in quotes unless you are using a field to refer to the value list name indirectly.
If I have a file named TestFile.fp7 and a value list defined in it named Fruit when I look at it in Manage | Value Lists... I can use ValueListItems like this:
ValueListItems ( "TestFile" ; "Fruit" )
If I omit either set of quotation marks, I'll get the error you describe. If the quoted text does not match the name of a file or value list, I get an empty list returned by this function.