<!--
{
  "availability" : [
    "iOS: 27.2.0 -",
    "iPadOS: 27.2.0 -",
    "macCatalyst: 27.2.0 -",
    "macOS: 27.2.0 -",
    "visionOS: 27.2.0 -",
    "watchOS: 27.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/Event/data(entryID:action:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation Models",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:16FoundationModels38LanguageModelExecutorGenerationChannelV5EventV4data7entryID6actionAESSSg_AC9DataEntryV6ActionVtFZ"
  },
  "title" : "data(entryID:action:)"
}
-->

# data(entryID:action:)

A data-entry event addressed to a transcript entry.

```
static func data(entryID: String? = nil, action: LanguageModelExecutorGenerationChannel.DataEntry.Action) -> LanguageModelExecutorGenerationChannel.Event
```

## Parameters

`entryID`

The identifier for the data entry to upsert. Pass `nil` to
have the framework assign a fresh id.

`action`

The operation to perform on the data entry.

## Discussion

The entry’s `contentType` (from [`update(contentType:content:metadata:)`](/documentation/FoundationModels/LanguageModelExecutorGenerationChannel/DataEntry/Action-swift.struct/update(contentType:content:metadata:)))
is checked against [`supportsDataEntryType(_:)`](/documentation/FoundationModels/LanguageModel/supportsDataEntryType(_:)) before the entry is
appended, and rejected entries surface as
[`LanguageModelError.unsupportedTranscriptContent(_:)`](/documentation/FoundationModels/LanguageModelError/unsupportedTranscriptContent(_:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)