MMQuery_GetFieldValueByID
- Description
This function retrieves the Value of a Single Field from a Record with a specific ID. The first parameter is the Name of a Table Occurrence of the Table to Get the Field Value from. If you do not specify this parameter, MMQuery will use Get(LayoutTableName) to get the Current Layout TO to Get the Field Value from. The second parameter is the Name of the Field to retrieve. The third parameter is the Internal FileMaker Record ID of the Record to retrieve the Field Value from. If you do not specify this parameter, MMQuery will use Get(RecordID) to get the Record ID. By default, MMQuery will check to make sure the TO Name, the Field Name, and the Record ID you specify exist before attempting to Get the Field Value. If you already know for sure that the TO Name, the Field Name, and the Record ID exist, you can pass True as the fourth, fifth, and sixth parameters.
- Return Type
- Varies
- Format
- MMQuery_GetFieldValueByID ( TOName ; FieldName ; FMRecID ; SkipTONameCheck ; SkipFieldNameCheck ; SkipFMRecIDCheck )
- Required Parameters
- TOName
The Name of a Table Occurrence for the Table to Get the Field Value from. 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".
- FieldName
The Name of the Field to retrieve the Value from.
- TOName
- Optional Parameters
- FMRecID
The Internal FileMaker Record ID of the Record to Get the Field Value from.
- SkipTONameCheck
If True, MMQuery will not check to make sure the TO Name you specified actually exists before retrieving the Field Value.
- SkipFieldNameCheck
If True, MMQuery will not check to make sure the Field Name you specified actually exists before retrieving the Field Value.
- SkipFMRecIDCheck
If True, MMQuery will not check to make sure the Record ID you specified actually exists before retrieving the Field Value.
- FMRecID
- Related Items
- MMQuery_AddField, MMQuery_FieldExists, MMQuery_GetFieldIDs, MMQuery_GetFieldNames, MMQuery_GetFieldTypes, MMQuery_GetFieldValueByFind, MMQuery_RemoveField, MMQuery_SetFieldValueByFind, MMQuery_SetFieldValueByID
- Examples
Example 1
Code:
MMQuery_GetFieldValueByID("MyTable";"AField"; 4 )Result:
This would retrieve the Value of the "AField" Field from the "MyTable" Table from the Record with the ID 4.Example 2
Code:
MMQuery_GetFieldValueByFind("";"FirstName")Result:
This would retrieve the Value of the "FirstName" Field from the current Table from the current Record.Example 3
Code:
MMQuery_GetFieldValueByID("AnotherFile.MyTable";"AField")Result:
In FileMaker Pro 11 and above, use this form to get the Field Value from a Table Occurrence in a separate, open Database file.