---
title: "value(forInputKey:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/qcplugin/value(forinputkey:)"
---

# value(forInputKey:)

Returns the current value for an input port.

## Declaration

```swift
func value(forInputKey key: String!) -> Any!
```

## Parameters

- `key`: The key for the input port you want to check.

## Return Value

Return Value The value associated with the key or nil if called outside of the execute(_:atTime:withArguments:) method.

## Discussion

Discussion You call this method from within your execute(_:atTime:withArguments:) method to retrieve the input values of your custom patch.

## See Also

### Getting and Setting Port Values

- [didValue(forInputKeyChange:)](quartz/qcplugin/didvalue(forinputkeychange:).md)
- [setValue(_:forOutputKey:)](quartz/qcplugin/setvalue(_:foroutputkey:).md)
