---
title: "ruleEditor(_:displayValueForCriterion:inRow:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsruleeditordelegate/ruleeditor(_:displayvalueforcriterion:inrow:)"
---

# ruleEditor(_:displayValueForCriterion:inRow:)

Returns the value for a given criterion.

## Declaration

```swift
@MainActor func ruleEditor(_ editor: NSRuleEditor, displayValueForCriterion criterion: Any, inRow row: Int) -> Any
```

## Parameters

- `editor`: The rule editor that sent the message.
- `criterion`: The criterion for which the value is required.
- `row`: The row number of criterion.

## Return Value

Return Value The value for criterion.

## Discussion

Discussion The value should be an instance of NSString, NSView, or NSMenuItem. If the value is an NSView or NSMenuItem, you must ensure it is unique for every invocation of this method; that is, do not return a particular instance of NSView or NSMenuItem more than once. Special Considerations The delegate must implement this method.

## See Also

### Providing Data

- [ruleEditor(_:child:forCriterion:with:)](appkit/nsruleeditordelegate/ruleeditor(_:child:forcriterion:with:).md)
- [ruleEditor(_:numberOfChildrenForCriterion:with:)](appkit/nsruleeditordelegate/ruleeditor(_:numberofchildrenforcriterion:with:).md)
- [ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:)](appkit/nsruleeditordelegate/ruleeditor(_:predicatepartsforcriterion:withdisplayvalue:inrow:).md)
- [NSRuleEditor.PredicatePartKey](appkit/nsruleeditor/predicatepartkey.md)
