MMQuery

Query your databases without relationships.

<- Back to MMQuery function list

MMQuery_GetTOIDs

Description

This function returns either the ID of a specific Table Occurrence or a list of "TOName=TOID" pairs for all Table Occurrences in the Database File. If you specify a TO Name in the first parameter, MMQuery will return the Table Occurrence ID of that specific Table Occurrence. If you do not specify this parameter, MMQuery will return a list of "TOName=TOID" pairs for all the TOs in the Database File. By default, MMQuery will check to make sure the TO Name you specify exists before getting the Table ID. If you already know for sure that the TO Name exists, you can pass True as the second parameter.

Return Type
Text or Number
Format
MMQuery_GetTOIDs ( TOName ; SkipTONameCheck )
Optional Parameters
  • TOName

    If you specify this parameter, MMQuery will return the ID of the Table Occurrence you specify. Specify "" to return the Table Occurrence IDs of all Table Occurrences. In FileMaker Pro 11 and above, you can optionally specify the Database Filename (without the ".fp7" extension) followed by a period to retrieve all the Table Occurrence IDs in that file (eg. "FileName."). Also 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, MMQuery will not check to make sure the TO Name you specify actually exists.

Related Items
MMQuery_AddTable, MMQuery_GetBaseTableNames, MMQuery_GetTONames, MMQuery_RemoveTable, MMQuery_TOExists
Examples

Example 1

Code:

MMQuery_GetTOIDs

Result:

Returns something like:<br/>
MyTable=1065089<br/>
AnotherTable=1065092

Example 2

Code:

MMQuery_GetTOIDs("AnotherTable")

Result:

Returns 1065092 if the TO ID for the "AnotherTable" Table in the current Database File is 1065092.

Example 3

Code:

MMQuery_GetTOIDs("AnotherFile.")

Result:

In FileMaker Pro 11 and above, use this form to get all the Table Occurrence IDs from a separate, open Database file.

Example 4

Code:

MMQuery_GetTOIDs("AnotherFile.MyTable")

Result:

In FileMaker Pro 11 and above, use this form to get the Table Occurrence ID from a Table Occurrence in a separate, open Database file.