searchElement(forProperty:label:key:value:comparison:)
Returns a search element object that searches for records of this type.
Declaration
class func searchElement(forProperty property: String!, label: String!, key: String!, value: Any!, comparison: ABSearchComparison) -> ABSearchElement!Parameters
- property:
The name of the property to search on. It cannot be
nil. For a full list of the properties, see Default Record Properties and Default Group Properties. - label:
The label name for a multivalue list. If
propertydoes not have multiple values, passnil. Ifpropertydoes have multiple values, passnilto search all the values. By default,ABGrouprecords don’t contain any multivalue list properties. - key:
The key name for a dictionary. Pass
nilifpropertyis not a dictionary. Ifpropertyis a dictionary, passnilto search all keys. By default,ABGrouprecords don’t contain any properties that are dictionaries. - value:
What you’re searching for. If
nil, the only supported value forcomparisoniskABEqualorkABNotEqual. - comparison:
The type of comparison to perform and is an Absearchcomparison, such as
kABEqualorkABPrefixMatchCaseInsensitive.