Product Logo

CNS Query

Query your databases without relationships.

Functions

CNSQuery_GetLayoutIDs

NameCNSQuery_GetLayoutIDs
Description

This function returns either the ID of a specific Layout or a list of “LayoutName=LayoutID” pairs for all Layouts in the current Database File. If you specify a Layout Name in the first parameter, CNS Query will return the Layout ID of that specific Layout. If you do not specify this parameter, CNS Query will return a list of “LayoutName=LayoutID” pairs for all the Layouts in the current Database File. By default, CNS Query will check to make sure the Layout Name you specify exists before getting the Layout IDs. If you already know for sure that the Layout name exists, you can pass True as the second parameter.

Return TypeText or Number
FormatCNSQuery_GetLayoutIDs ( LayoutName ; SkipLayoutNameCheck )
Optional Parameters
LayoutName

If you specify this parameter, CNS Query will return the ID of the Layout you specify. Otherwise, CNS Query will return all the IDs of all the Layouts.

SkipLayoutNameCheck

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

Examples
Example 1

Returns something like:<br/> ZLayout=1<br/> YLayout=2

CNSQuery_GetLayoutIDs
Example 2

Returns 2 if the Layout ID for the "YLayout" Layout in the current Database File is 2.

CNSQuery_GetLayoutIDs( "YLayout" )