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

# predicate(withSubpredicates:)

Returns the predicate represented by the receiver’s views’ values and the given sub-predicates.

```
func predicate(withSubpredicates subpredicates: [NSPredicate]?) -> NSPredicate
```

## Parameters

`subpredicates`

An array of predicates.

## Return Value

The predicate represented by the values of the template’s views and the given subpredicates. You can override this method to return the predicate represented by your custom views.

## 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 method to return the predicate represented by a custom view.

---

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)