<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSFetchedResultsController/sectionNameKeyPath",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFetchedResultsController(py)sectionNameKeyPath"
  },
  "title" : "sectionNameKeyPath"
}
-->

# sectionNameKeyPath

The key path of the attribute that determines which section the fetched entity belongs to.

```
var sectionNameKeyPath: String? { get }
```

## Discussion

This property returns the value you specify for the `sectionNameKeyPath` parameter when you initialize the fetched results controller.

If the controller generates sections, typically this property’s value matches the specified key path of the first sort descriptor in the controller’s fetch request. If the two key paths don’t match, then they must generate the same relative ordering. For example, the fetch request’s first sort descriptor might specify the key path of a persistent attribute, but [`sectionNameKeyPath`](/documentation/CoreData/NSFetchedResultsController/sectionNameKeyPath) might specify the key path of a transient attribute that derives its value from the persistent one.

---

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)