MMQuery

Query your databases without relationships.

<- Back to MMQuery function list

MMQuery_UpdateRecordByID

Description

This function Updates a Record in a Table Occurrence using its Internal FileMaker Record ID. The first parameter is the Name of a Table Occurrence of the Table to Update the Record in. If you do not specify this parameter, MMQuery will use Get(LayoutTableName) to get the Current Layout Table to Update the Record in. The second parameter is the Internal FileMaker Record ID of the Record you want to Update. The third parameter is a return- or paragraph mark-separated list of "FieldName=FieldValue" pairs describing the Field Values to Update the Record with. If a Field Value needs a return in it, you can use "<CR>" to indicate a return. By default, MMQuery will check to make sure the TO Name, the Record ID, and the Field Names you specify exist before attempting to Update the Record. If you already know for sure that the TO Name, the Record ID, and the Field Names exist, you can pass True as the fourth, fifth, and sixth parameters.

Return Type
Text
Format
MMQuery_UpdateRecordByID ( TOName ; FMRecID ; FieldValues ; SkipTONameCheck ; SkipFMRecIDCheck ; SkipFieldNameChecks )
Required Parameters
  • TOName

    The Name of the Table Occurrence that contains the Record you want to Update. 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".

  • FMRecID

    The Internal FileMaker Record ID of the Record to Update.

  • FieldValues

    A return- or paragraph mark-separated list of "FieldName=FieldValue" pairs describing the new Field Values to Update the Record with. Use "<CR>" to indicate a return or new line in a Field Value.

Optional Parameters
  • SkipTONameCheck

    If True, MMQuery will not check to make sure the TO Name you specified actually exists before Updating the Record.

  • SkipFMRecIDCheck

    If True, MMQuery will not check to make sure the Record ID you specified actually exists before Updating the Record.

  • SkipFieldNameChecks

    If True, MMQuery will not check to make sure the Field Names you specified actually exist before Updating the Record.

Related Items
MMQuery_AddRecord, MMQuery_FindRecords, MMQuery_RemoveRecordByFind, MMQuery_RemoveRecordByID, MMQuery_UpdateRecordByFind
Examples

Example 1

Code:

MMQuery_UpdateRecordByID("MyTable"; 2 ;"BField=some new value¶CField=some other value")

Result:

Updates the Record with the ID 2 in the "MyTable" Table, setting the "BField" Field to "some new value" and the "CField" Field to "some other value".

Example 2

Code:

MMQuery_UpdateRecordByID(""; 4 ;"Description=some<CR>value<CR>with<CR>multiple<CR>lines")

Result:

Updates the Record with ID 4 in the current Table, setting the "Description" field with a multi-line value.

Example 3

Code:

MMQuery_UpdateRecordByID("AnotherFile.MyTable"; 4 ;"BField=some new value")

Result:

In FileMaker Pro 11 and above, use this form to Update a Record in a Table Occurrence in a separate, open Database file.