---
title: "ABSearchElementCreateWithConjunction(_:_:)"
framework: addressbook
role: symbol
role_heading: Function
path: "addressbook/absearchelementcreatewithconjunction(_:_:)"
---

# ABSearchElementCreateWithConjunction(_:_:)

Returns a compound search element created by combiningthe search elements in an array with the given conjunction.

## Declaration

```swift
func ABSearchElementCreateWithConjunction(_ conjunction: ABSearchConjunction, _ childrenSearchElement: CFArray!) -> Unmanaged<ABSearchElementRef>!
```

## Parameters

- `conjunction`: The conjunction used to join the search elements in children. Can be either doc://com.apple.addressbook/documentation/AddressBook/kABSearchAnd or doc://com.apple.addressbook/documentation/AddressBook/kABSearchOr.
- `childrenSearchElement`: An array containing ABSearchElement objects to be joined using conjunction. If NULL this function raises an exception.

## Return Value

Return Value A new compound searchelement joining the search elements in children using conjunction.You are responsible for releasing this object.

## See Also

### Search Elements

- [ABCopyArrayOfMatchingRecords(_:_:)](addressbook/abcopyarrayofmatchingrecords(_:_:).md)
- [ABSearchElementMatchesRecord(_:_:)](addressbook/absearchelementmatchesrecord(_:_:).md)
