Solved this. Typically I copy a db to the server then upload it from the server interface.
I deleted that db from the server. Then I uploaded to the server the working db sitting on my personal computer desktop and it all works.
Cannot explain it but that is what happened.
I'm curious, what method are you using to move the results of the FieldNames solution into a value list?
(A calculation field using this function must be unstored or it won't update if you change the layout. If it's unstored, you can't use it as the data source for a value list.)
You must be right Phil. I did change the layout. Just now I reproduced this problem. I changed the layout and the FieldNames does not update. I duplicated the layout and then changed the layout name in the Fieldnames function. Did not work. Turned on and off the storage and that did not work.
The only thing that worked once I changed the layout was to delete the calculation and then recreate it. _cFieldList FieldNames (Get (filename); "SearchFields2"
Do you agree? That is the only way tomake it work once the layout is changed?
Thank you once again. I know a little more now.
One more thing. It is not possible to change the layout and make this work if work is done while the db is hosted on the server. Removed db from server and did the same steps on the desktop. It worked. Then uploaded working db to server.
Here's a possible work around:
Make the calculation an unstored calculation so that it is always correct. Add a second text field to use as the value source for your value list. Use the OnLayoutExit script trigger to copy the contents of the unstored calc field to the text field via a set field step.
Since any layout change will require visiting and exiting the layout, you should be able to make this work to keep an updated field name list in your value list. I suspect that you may have to discipline yourself to always return to browse mode after modifying the layout instead of immediatedly changing layouts, but since layout mods should only be done by the developer, this should be a limitation you can live with. (And if you forget, you can force the update just by going to the layout and then leaving it again, you can even script and update of the text field as part of the start up process when you open the file just to make sure the list is always up to date.)
Okay, finally had some time for fooling around so copied the working db and uploaded to server for the test.
Changed 'search fields' layout and saved and exited layout so I am in browse mode (usually do I think).
Changed name of _FieldList to _FieldListUnstored and tell it to be unstored.
Create text field FieldListForValueList
Change Value List to refer to above field.
Make script to set FieldListForValueList to _FieldListUnstored
In Layout setup tell search fields layout to perform that script on layout exit.
FABULOUS! Thank you once again.