I used the dataviewer Fin FileMaker Advanced 13.04 on a Windows 7 system to run a test on one of my files.
FieldNames ( Get ( FileName ) ; Get ( LayoutName ) )
Returned the following list from the current layout visible in this file:
This is exactly the fields present on this layout. The fields that start with GlobalFIelds:: are fields from a different table occurrence than that specified for the current layout. This included fields that I "hid" by putting them to the right of the layout boundary.
I then made a copy of the layout, deleted some fields from the layout and tested the function again. I got:
The difference in this list corresponds exactly with the fields that I removed from the layout. (But this change only appeared once I saved my changes to the layout...)
The fields on the layout have always been 7 and not 20 (= number of fields in the table and listed with the function) and has not changed between the various viewings with the debugger (I also closed FM -> restarted -> viewed = same "error") and no hidden fields on the layout or empty web-viewer.
I just have 02 popover calls with 06 fields (global, 04 + 02) in the same table as the layout one. So "13" should be the maximum of fields listed, I guess.
- if I use WordCount the result is 22, as "::" is considered a "word limiter", so "Table::Field" are for FM two words here
- if I use ValueCount the result is 14, i.e. 20 (fields in the table) - 06 (global_fields in the table), although still 22 listed (=20 fields in the table + 02 related fields).
I use FM13.03 - Win7 64Pro SP1 - DB size 3.12Mb no external sources called - Xenon 3.07 GHz - 8,0 Gb RAM
ValueCount Should return the exact number of fields placed on the layout specified in the FieldNames function.
Please note that it is very easy to have fields on a layout that are either not visible--even in layout mode or easily over looked.
You can, for example, size a field to be 1 pixel high and 1 pixel wide. You can also place a field behind an opague object on the layout--just to name two possible ways that you might overlook the fact that a field is actually present on your layout.