<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPredicateEditorRowTemplate/setPredicate(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPredicateEditorRowTemplate(im)setPredicate:"
  },
  "title" : "setPredicate(_:)"
}
-->

# setPredicate(_:)

Sets the value of the views according to the given predicate.

```
func setPredicate(_ predicate: NSPredicate)
```

## Parameters

`predicate`

The predicate value for the receiver.

## Discussion

This method is only called if [`match(for:)`](/documentation/AppKit/NSPredicateEditorRowTemplate/match(for:)) returned a positive value for the receiver.

You can override this to set the values of custom views.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)