Answers.Body: <p>If you expand the query info section it's interpreting the query as &quot;notes entered by that contact&quot;, so the &quot;older&quot; ones might have been ones like that.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-26T21:29:07.703Z
Answers.Text: Thankees, that is exactly it on the results that show up, and I missed that. Is the query that's generated expected? It feels a little non-intuitive, and I'm wondering if it's a bug (which I'm happy to file), or if I'm missing how to display the notes (there's a Contact Notes Created By where I'd expect this, but not with the Contact Notes itself).
Answers.UserDisplayName: Kev Needham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-26T23:56:08.077Z
Answers.Text: I don't know if it's expected.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-27T16:03:27.817Z
Answers.Text: It looks like somebody else noticed the same issue and there's a fix pending: https://github.com/civicrm/civicrm-core/pull/25672
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-26T21:13:39.027Z
Answers.LastActivityDate: 2023-02-26T21:13:39.027Z
Answers.UserDisplayName: Demerit
Body: <p>When performing a contacts search using SearchKit, I'd like to be able to get a list of notes associated with a contact (e.g. return all the notes associated with them). If I search on Notes with Contacts I can get a list, but if I search on Contacts with Notes I don't get any results. What's interesting is that it works on some older records, but not newer ones, so not sure if there's been a schema change at some point that's breaking things.</p>
  <p>Steps to reproduce:</p>
  <ul>
  <li>Add a few notes to one or more contacts</li>
  <li>Create a SearchKit Search for &quot;Contacts&quot; With (Required) Contact Notes</li>
  <li>Add Note ID and Note to the report columns</li>
  <li>(Optionally) set the field transformations to List for Note ID and Note</li>
  <li>Execute the search</li>
  </ul>
  <p>Expected results: A list of Contacts that have Notes associated with them, with the Notes detail in the related columns.</p>
  <p>Actual results: No results</p>
  <p>I tried this on <a href="https://dmaster.demo.civicrm.org/" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/</a> as well.</p>
  <p>Am I not understanding how this should work?</p>
  <p>Does not work (Contacts)
  <a href="https://i.sstatic.net/AfkY6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AfkY6.png" alt="SearchKit Report on Contacts" /></a></p>
  <p>Works (Notes)
  <a href="https://i.sstatic.net/6a7fy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6a7fy.png" alt="SearchKit Report on Notes" /></a></p>
  
Tags: <search-results><searchkit>
Title: SearchKit: Adding Multiple Notes to Contact Reporting Not Working as Expected
ThreadText: # SearchKit: Adding Multiple Notes to Contact Reporting Not Working as Expected
  
  (Asked by: username_0 on 2023-02-26)
  
  When performing a contacts search using SearchKit, I'd like to be able to get a list of notes associated with a contact (e.g. return all the notes associated with them). If I search on Notes with Contacts I can get a list, but if I search on Contacts with Notes I don't get any results. What's interesting is that it works on some older records, but not newer ones, so not sure if there's been a schema change at some point that's breaking things.
  
  Steps to reproduce:
  
  * Add a few notes to one or more contacts
  * Create a SearchKit Search for "Contacts" With (Required) Contact Notes
  * Add Note ID and Note to the report columns
  * (Optionally) set the field transformations to List for Note ID and Note
  * Execute the search
  
  Expected results: A list of Contacts that have Notes associated with them, with the Notes detail in the related columns.
  
  Actual results: No results
  
  I tried this on <https://dmaster.demo.civicrm.org/> as well.
  
  Am I not understanding how this should work?
  
  Does not work (Contacts)
  [![SearchKit Report on Contacts](https://i.sstatic.net/AfkY6.png)](https://i.sstatic.net/AfkY6.png)
  
  Works (Notes)
  [![SearchKit Report on Notes](https://i.sstatic.net/6a7fy.png)](https://i.sstatic.net/6a7fy.png)
  
  **Tags:** search-results, searchkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-02-26. Score: 1
  
  If you expand the query info section it's interpreting the query as "notes entered by that contact", so the "older" ones might have been ones like that.
  
  > **Comments:**
  > **username_0**: Thankees, that is exactly it on the results that show up, and I missed that. Is the query that's generated expected? It feels a little non-intuitive, and I'm wondering if it's a bug (which I'm happy to file), or if I'm missing how to display the notes (there's a Contact Notes Created By where I'd expect this, but not with the Contact Notes itself).  
  > **username_1**: I don't know if it's expected.  
  > **username_1**: It looks like somebody else noticed the same issue and there's a fix pending: https://github.com/civicrm/civicrm-core/pull/25672  
  
  ---
  
  