---
title: "appendOutcomeValue(withType:at:completion:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ocktaskcontrollerprotocol/appendoutcomevalue(withtype:at:completion:)-3est6"
---

# appendOutcomeValue(withType:at:completion:)

Adds an outcome value to the array of outcomes for an event.

## Declaration

```swift
func appendOutcomeValue(withType underlyingType: OCKOutcomeValueUnderlyingType, at indexPath: IndexPath, completion: ((Result<OCKAnyOutcome, Error>) -> Void)?)
```

## Parameters

- `underlyingType  `: The type of value of the outcome.
- `indexPath  `: The location of the collection view event in the task view controller.
- `completion  `: A completion handler that the function calls when it is done.

## See Also

### Handling Task Selection

- [eventFor(indexPath:)](carekit/ocktaskcontrollerprotocol/eventfor(indexpath:)-6lqed.md)
- [makeOutcomeFor(event:withValues:)](carekit/ocktaskcontrollerprotocol/makeoutcomefor(event:withvalues:)-4sb0b.md)
- [setEvent(atIndexPath:isComplete:completion:)](carekit/ocktaskcontrollerprotocol/setevent(atindexpath:iscomplete:completion:)-11kln.md)
- [initiateDeletionForOutcomeValue(atIndex:eventIndexPath:deletionCompletion:)](carekit/ocktaskcontrollerprotocol/initiatedeletionforoutcomevalue(atindex:eventindexpath:deletioncompletion:)-4hoy0.md)
- [initiateDetailsViewController(forIndexPath:)](carekit/ocktaskcontrollerprotocol/initiatedetailsviewcontroller(forindexpath:)-5gptc.md)
