Audit.FieldNameForID
--------------------

Looks up the Audit cache for a field ID.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Audit](component_Audit.md) | [8.0](newinversion80.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Audit.FieldNameForID"; TableName; FieldID ) 

**MBS**( **"Audit.FieldNameForID";** /\* Looks up the Audit cache for a field ID. \*/  
**$TableName**; /\* The table name or ID.  
Can be ID of table, so we lookup name by ID.   
Can be result of GetFieldName() function as we remove field name automatically.e.g. "MyTable" \*/   
**$FieldID**) /\* The field ID to lookup.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| TableName | The table name or ID.   Can be ID of table, so we lookup name by ID.    Can be result of GetFieldName() function as we remove field name automatically. | "MyTable" |
| FieldID | The field ID to lookup. | 1 |

### Result

Returns field name or error.

### Description

Looks up the Audit cache for a field ID.  
Returns empty result if not found.  
Version 8.2 allows you to pass table reference by ID.  
### Examples

Query first field name in Kontakte:

 MBS ( "Audit.FieldNameForID"; "Kontakte"; 1 )  
<small>  
Example result: "KONTAKT\_ID ABGLEICHSFELD"</small>### See also

- [Audit.FieldIDForName](AuditFieldIDForName.md)
- [Audit.TableNameForID](AuditTableNameForID.md)

### Release notes

- **Version 8.2**
    - Changed [Audit.FieldNameForID](http://www.mbsplugins.eu/AuditFieldNameForID.shtml) to accept table ID or name.
- **Version 8.0**
    - Added [Audit.FieldNameForID](http://www.mbsplugins.eu/AuditFieldNameForID.shtml) and [Audit.TableNameForID](http://www.mbsplugins.eu/AuditTableNameForID.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 8.2pr4](https://www.mbsplugins.de/archive/2018-04-24/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 20th January 2018 , last changed 17th January 2020

  
[Audit.FieldIDForName](AuditFieldIDForName.md) - [Audit.GetAuditLogTableName](AuditGetAuditLogTableName.md)

[HTML Version](AuditFieldNameForID.shtml)