MMQuery

Query your databases without relationships.

<- Back to MMQuery function list

MMQuery_SetFieldValueByID

Description

This function Sets the Value of a single Field in a Record with a specific ID. The first parameter is the Name of a Table Occurrence of the Table to Set The Field Value in. If you do not specify this parameter, MMQuery will use Get(LayoutTableName) to get the Current Layout TO to Set the Field Value in. The second parameter is the Name of the Field to Set. The third parameter is the new Value for the Field. The fourth parameter is the Internal FileMaker Record ID of the Record to Set the Field Value in. 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 Set 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 fifth, sixth, and seventh parameters.

Return Type
Text
Format
MMQuery_SetFieldValueByID ( TOName ; FieldName ; FieldValue ; FMRecID ; SkipTONameCheck ; SkipFieldNameCheck ; SkipFMRecIDCheck )
Required Parameters
  • TOName

    The Name of a Table Occurrence of the Table to Set the Field Value in. 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 Set.

  • FieldValue

    The new Value for the Field.

Optional Parameters
  • FMRecID

    The Internal FileMaker Record ID of the Record to Set the Field Value in.

  • SkipTONameCheck

    If True, MMQuery will not check to make sure the TO Name you specified actually exists before Setting the Field Value.

  • SkipFieldNameCheck

    If True, MMQuery will not check to make sure the Field Name you specified actually exists before Setting the Field Value.

  • SkipFMRecIDCheck

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

Related Items
MMQuery_AddField, MMQuery_FieldExists, MMQuery_GetFieldIDs, MMQuery_GetFieldNames, MMQuery_GetFieldTypes, MMQuery_GetFieldValueByFind, MMQuery_GetFieldValueByID, MMQuery_RemoveField, MMQuery_SetFieldValueByFind
Examples

Example 1

Code:

MMQuery_SetFieldValueByID("MyTable";"AField";"some new value"; 4 )

Result:

This would Set the Value of the "AField" Field in the "MyTable" Table" with the Record with ID 4 to the Value "some new value".

Example 2

Code:

MMQuery_SetFieldValueByID("";"FirstName";"Maryanne")

Result:

This would Set the Value of the "FirstName" Field of the current Record in the current Table to the Value "Maryanne".

Example 3

Code:

MMQuery_SetFieldValueByID("AnotherFile.MyTable";"AField";"some new value"; 4 )

Result:

In FileMaker Pro 11 and above, use this form to Set a Field Value in a Table in a separate, open Database file.