<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SectionedFetchRequest/init(fetchRequest:sectionIdentifier:transaction:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI21SectionedFetchRequestV05fetchE017sectionIdentifier11transactionACyxq_GSo07NSFetchE0Cyq_G_s7KeyPathCyq_xGAA11TransactionVtcfc"
  },
  "title" : "init(fetchRequest:sectionIdentifier:transaction:)"
}
-->

# init(fetchRequest:sectionIdentifier:transaction:)

Creates a fully configured sectioned fetch request that uses the
specified transaction when updating results.

```
@MainActor @preconcurrency init(fetchRequest: NSFetchRequest<Result>, sectionIdentifier: KeyPath<Result, SectionIdentifier>, transaction: Transaction)
```

## Parameters

`fetchRequest`

An
<doc://com.apple.documentation/documentation/CoreData/NSFetchRequest>
instance that describes the search criteria for retrieving data
from the persistent store.

`sectionIdentifier`

A key path that SwiftUI applies to the `Result`
type to get an object’s section identifier.

`transaction`

A transaction to use for user interface changes that
result from changes to the fetched results.

## Discussion

Use this initializer if you need a fetch request with updates that
affect the user interface based on a [`Transaction`](/documentation/SwiftUI/Transaction). Otherwise, use
[`init(fetchRequest:sectionIdentifier:animation:)`](/documentation/SwiftUI/SectionedFetchRequest/init(fetchRequest:sectionIdentifier:animation:)).

---

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)