Product Logo

CNS Query

Query your databases without relationships.

Functions

CNSQuery_GetFieldNames

NameCNSQuery_GetFieldNames
Description

This function returns a list of Field Names from a Table. The first parameter is the name of a Table Occurrence of the Table to return the Field Names from. If you do not specify this parameter, CNS Query will use Get(LayoutTableName) to get the current Table to return the Field Names from. By default, CNS Query will check to make sure the TO Name you specify exists before getting the Field Names. If you already know for sure that the TO Name exists, you can pass True as the second parameter.

Note: In FileMaker Pro 7.0 to FileMaker Pro 8.0, to ensure that you get the Names of all the Fields in your Table, you must make sure that there is not a Layout in your Database with the same name as the TO Name you specify for this Function. If you are using FileMaker Pro 8.5 or above, this is no longer an issue.

Return TypeText
FormatCNSQuery_GetFieldNames ( TOName ; SkipTONameCheck )
Optional Parameters
TOName

The Name of a Table Occurrence of the Table that contains the Fields. Specify “” to use the Current Layout TO. In FileMaker Pro 11 and above, you can optionally specify the Database Filename (without the “.fp7” extension) containing the TO in the format “FileName.TOName”.

SkipTONameCheck

If True, CNS Query will not check to make sure the TO Name you specify actually exists.

Examples
Example 1

Returns something like: AField BField

CNSQuery_GetFieldNames( "MyTable" )
Example 2

In FileMaker Pro 11 and above, use this form to get the Field Names of a Table in a separate, open Database file.

CNSQuery_GetFieldNames( "AnotherFile.MyTable" )