---
title: "init(fetchRequest:sectionIdentifier:transaction:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/sectionedfetchrequest/init(fetchrequest:sectionidentifier:transaction:)"
---

# init(fetchRequest:sectionIdentifier:transaction:)

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

## Declaration

```swift
@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

Discussion Use this initializer if you need a fetch request with updates that affect the user interface based on a Transaction. Otherwise, use init(fetchRequest:sectionIdentifier:animation:).

## See Also

### Creating a fully configured fetch request

- [init(fetchRequest:sectionIdentifier:animation:)](swiftui/sectionedfetchrequest/init(fetchrequest:sectionidentifier:animation:).md)
