<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODRecordCopyValues(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:@F@ODRecordCopyValues"
  },
  "title" : "ODRecordCopyValues(_:_:_:)"
}
-->

# ODRecordCopyValues(_:_:_:)

Returns the value of a single attribute of a record.

```
func ODRecordCopyValues(_ record: ODRecordRef!, _ attribute: String!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFArray>!
```

## Parameters

`record`

The record.

`attribute`

The attribute.

`error`

An error reference for error details. Can be `NULL`.

## Return Value

The value of the requested attribute, or `NULL` if the attribute doesn’t exist.

## Discussion

If the requested attribute has not been fetched before, it is fetched in order to return its value. If the record has been fetched before, internal storage is consulted instead of the directory.

---

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)