---
title: sortBy
framework: swiftdata
role: symbol
role_heading: Instance Property
path: swiftdata/historydescriptor/sortby
---

# sortBy

The sort descriptor to use to sort the returned history data.

## Declaration

```swift
var sortBy: [SortDescriptor<TransactionType>]
```

## See Also

### Getting the descriptor configuration

- [fetchLimit](swiftdata/historydescriptor/fetchlimit.md)
- [predicate](swiftdata/historydescriptor/predicate.md)
