---
title: valueListAttributes
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmetadataquery/valuelistattributes
---

# valueListAttributes

An array of attributes whose values are gathered by the query.

## Declaration

```swift
var valueListAttributes: [String] { get set }
```

## Discussion

Discussion The query collects the values of these attributes into uniqued lists that can be used to summarize the results of the query. If attributes is nil, the query generates no value lists. Note that value list collection increases CPU usage and significantly increases the memory usage of an NSMetadataQuery object. Setting this property while a query is running stops the query and discards the current results. The receiver immediately starts a new query. For a list of valid attributes, see Attribute Keys and Cloud Storage Keys in NSMetadataItem.

## See Also

### Related Documentation

- [valueLists](foundation/nsmetadataquery/valuelists.md)

### Configuring queries

- [searchScopes](foundation/nsmetadataquery/searchscopes.md)
- [predicate](foundation/nsmetadataquery/predicate.md)
- [sortDescriptors](foundation/nsmetadataquery/sortdescriptors.md)
- [groupingAttributes](foundation/nsmetadataquery/groupingattributes.md)
- [notificationBatchingInterval](foundation/nsmetadataquery/notificationbatchinginterval.md)
- [delegate](foundation/nsmetadataquery/delegate.md)
- [searchItems](foundation/nsmetadataquery/searchitems.md)
