---
title: "ABMultiValueSetPrimaryIdentifier(_:_:)"
framework: Address Book
role: symbol
role_heading: Function
path: "addressbook/abmultivaluesetprimaryidentifier(_:_:)"
---

# ABMultiValueSetPrimaryIdentifier(_:_:)

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

## Declaration

```swift
func ABMultiValueSetPrimaryIdentifier(_ multiValue: ABMutableMultiValueRef!, _ identifier: CFString!) -> Bool
```

## Parameters

- `multiValue`: The multi-value list you wish to modify.
- `identifier`: The identifier corresponding to the value you wish to designate as the primary value for this multi-value list. Use the doc://com.apple.addressbook/documentation/AddressBook/ABMultiValueCopyIdentifierAtIndex(_:_:) function to get the identifier given the index. If identifier is NULL, this function raises an exception.

## Return Value

Return Value true ifsuccessfully, false otherwise.

## See Also

### Multi Values

- [ABMultiValueAdd(_:_:_:_:)](addressbook/abmultivalueadd(_:_:_:_:).md)
- [ABMultiValueCopyIdentifierAtIndex(_:_:)](addressbook/abmultivaluecopyidentifieratindex(_:_:).md)
- [ABMultiValueCopyLabelAtIndex(_:_:)](addressbook/abmultivaluecopylabelatindex(_:_:).md)
- [ABMultiValueCopyPrimaryIdentifier(_:)](addressbook/abmultivaluecopyprimaryidentifier(_:).md)
- [ABMultiValueCopyValueAtIndex(_:_:)](addressbook/abmultivaluecopyvalueatindex(_:_:).md)
- [ABMultiValueCount(_:)](addressbook/abmultivaluecount(_:).md)
- [ABMultiValueCreate()](addressbook/abmultivaluecreate().md)
- [ABMultiValueCreateCopy(_:)](addressbook/abmultivaluecreatecopy(_:).md)
- [ABMultiValueCreateMutable(_:)](addressbook/abmultivaluecreatemutable(_:).md)
- [ABMultiValueCreateMutableCopy(_:)](addressbook/abmultivaluecreatemutablecopy(_:).md)
- [ABMultiValueIndexForIdentifier(_:_:)](addressbook/abmultivalueindexforidentifier(_:_:).md)
- [ABMultiValueInsert(_:_:_:_:_:)](addressbook/abmultivalueinsert(_:_:_:_:_:).md)
- [ABMultiValuePropertyType(_:)](addressbook/abmultivaluepropertytype(_:).md)
- [ABMultiValueRemove(_:_:)](addressbook/abmultivalueremove(_:_:).md)
- [ABMultiValueReplaceLabel(_:_:_:)](addressbook/abmultivaluereplacelabel(_:_:_:).md)
