---
title: "ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsruleeditordelegate/ruleeditor(_:predicatepartsforcriterion:withdisplayvalue:inrow:)"
---

# ruleEditor(_:predicatePartsForCriterion:withDisplayValue:inRow:)

Returns a dictionary representing the parts of the predicate determined by the given criterion and value.

## Declaration

```swift
@MainActor optional func ruleEditor(_ editor: NSRuleEditor, predicatePartsForCriterion criterion: Any, withDisplayValue value: Any, inRow row: Int) -> [NSRuleEditor.PredicatePartKey : Any]?
```

## Parameters

- `editor`: The rule editor that sent the message.
- `criterion`: The criterion for which the predicate parts are required.
- `value`: The display value.
- `row`: The row number of criterion.

## Return Value

Return Value A dictionary representing the parts of the predicate determined by the given criterion and value. The keys of the dictionary should be the string constants specified in Predicate Part Keys with corresponding appropriate values.

## See Also

### Providing Data

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