Answers.Body: <p>Submitted a PR <a href="https://github.com/civicrm/civicrm-core/pull/30994" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/30994</a></p>
  <p>You can apply patch <a href="https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/30994.patch" rel="nofollow noreferrer">https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/30994.patch</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-28T09:35:20.063Z
Answers.LastActivityDate: 2024-08-28T09:35:20.063Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>With API4, I can search for <code>afform</code> entities like so:</p>
  <pre><code>$afforms = \Civi\Api4\Afform::get(TRUE)
    -&gt;addWhere('name', '=', 'afsearchNoteComments')
    -&gt;setLimit(25)
    -&gt;execute();
  </code></pre>
  <p>But in SearchKit, the <code>afform</code> entity is not available for searching (screenshot from dmaster &quot;Powered by CiviCRM 5.78.alpha1&quot;):</p>
  <p><a href="https://i.sstatic.net/2f9xcPsM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2f9xcPsM.png" alt="enter image description here" /></a></p>
  <p>This means I can't create a SearchKit listing of FormBuilder forms.</p>
  <p>If this is by design, what's the rationale?
  Or, am I just doing it wrong?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-27T19:52:12.103Z
Comments.Text: You wanna submit a PR to remove the `@searchable none` annotation from `\Civi\Api4\Afform.php`. I think it's fine to remove that restriction, as SK is getting more useful for 'meta' searches like this one.
Comments.UserDisplayName: Coleman
Tags: <searchkit><formbuilder><api4>
Title: Possible to create a SearchKit search of FormBuilder forms?
ThreadText: # Possible to create a SearchKit search of FormBuilder forms?
  
  (Asked by: username_0 on 2024-08-27)
  
  With API4, I can search for `afform` entities like so:
  
  ```
  $afforms = \Civi\Api4\Afform::get(TRUE)
    ->addWhere('name', '=', 'afsearchNoteComments')
    ->setLimit(25)
    ->execute();
  
  ```
  
  But in SearchKit, the `afform` entity is not available for searching (screenshot from dmaster "Powered by CiviCRM 5.78.alpha1"):
  
  [![enter image description here](https://i.sstatic.net/2f9xcPsM.png)](https://i.sstatic.net/2f9xcPsM.png)
  
  This means I can't create a SearchKit listing of FormBuilder forms.
  
  If this is by design, what's the rationale?
  Or, am I just doing it wrong?
  
  **Tags:** searchkit, formbuilder, api4
  
  > **Comments:**
  > **username_1**: You wanna submit a PR to remove the `@searchable none` annotation from `\Civi\Api4\Afform.php`. I think it's fine to remove that restriction, as SK is getting more useful for 'meta' searches like this one.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-08-28. Score: 1 | Accepted answer
  
  Submitted a PR <https://github.com/civicrm/civicrm-core/pull/30994>
  
  You can apply patch <https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/30994.patch>
  
  
  ---
  
  