---
title: "setPrimaryIdentifier(_:)"
framework: addressbook
role: symbol
role_heading: Instance Method
path: "addressbook/abmutablemultivalue/setprimaryidentifier(_:)"
---

# setPrimaryIdentifier(_:)

Sets the primary value to be the value for the given identifier.

## Declaration

```swift
func setPrimaryIdentifier(_ identifier: String!) -> Bool
```

## Parameters

- `identifier`: The identifier whose value will be used as the primary value for a multivalue property.

## Return Value

Return Value true if successful; otherwise false.

## Discussion

Discussion If the identifier is nil, this method raises an exception. Use the identifier(at:) method to get the identifier given the index.
