Answers.Body: <p>The advanced logging tables do not have an api4 entity. Even if they did, the civireport that shows you the changes uses a diffing algorithm you'd have to somehow replicate because the advanced logs do not store <em>changes</em>, they store <em>copies</em> of the changed record.</p>
  <p>What you're able to get in your description is coming from various fields on the contact record and from civicrm_log (the Log api4 entity - which is not the advanced logging and just has some basic info). I don't think you'll be able to get much more than what you've got, except you haven't mentioned Advanced Search - it has a changelog section which is basically the same as civicrm_log, but you can make a saved search from it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-08T14:17:16.947Z
Answers.Text: Thank you for confirming what isn't possible nowadays. I will try Advanced Search + Profile, then.
Answers.UserDisplayName: icaria36
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-08T04:34:49.253Z
Answers.LastActivityDate: 2023-12-08T04:34:49.253Z
Answers.UserDisplayName: Demerit
Body: <p>In a SearchKit query, how can we get the values of the field &quot;Modified by&quot; that can be seen in the change log of a contact? For what is worth, we have advanced logging enabled (&quot;Logging: Yes&quot; in settings).</p>
  <p>I want to build a &quot;Recent Changes&quot; saved search. This is the closest I'm getting:</p>
  <ul>
  <li>Search for: Contacts and Contact Logs (I have tried with Contact Reports as well)</li>
  <li>Where Modified Date is Last 7 Days Including Today (this works)</li>
  <li>Display Name for the Contact Modified (this works)</li>
  <li>Modified Date for the date modified (this works)</li>
  <li>&quot;Contact Logs: Modified By Display Name&quot; only shows data when the user modifies their own contact card. If they modify other contact cards, this value is empty.</li>
  </ul>
  <p>I can see the Modified By / Altered By logs in the contact cards. I have tried with values from Contact Reports but they don't bring any values. What am I missing?</p>
  <p>I thought it could be a problem of permissions but I'm an admin and &quot;Bypass Permissions&quot; in the table won't make any difference.</p>
  <p>If there is an entirely different way to get a list of Recent Changes, that would be useful to know too.</p>
  
Tags: <searchkit><user-account><logs>
Title: How to get the "Modified by" data in a SearchKit query?
ThreadText: # How to get the "Modified by" data in a SearchKit query?
  
  (Asked by: username_0 on 2023-12-07)
  
  In a SearchKit query, how can we get the values of the field "Modified by" that can be seen in the change log of a contact? For what is worth, we have advanced logging enabled ("Logging: Yes" in settings).
  
  I want to build a "Recent Changes" saved search. This is the closest I'm getting:
  
  * Search for: Contacts and Contact Logs (I have tried with Contact Reports as well)
  * Where Modified Date is Last 7 Days Including Today (this works)
  * Display Name for the Contact Modified (this works)
  * Modified Date for the date modified (this works)
  * "Contact Logs: Modified By Display Name" only shows data when the user modifies their own contact card. If they modify other contact cards, this value is empty.
  
  I can see the Modified By / Altered By logs in the contact cards. I have tried with values from Contact Reports but they don't bring any values. What am I missing?
  
  I thought it could be a problem of permissions but I'm an admin and "Bypass Permissions" in the table won't make any difference.
  
  If there is an entirely different way to get a list of Recent Changes, that would be useful to know too.
  
  **Tags:** searchkit, user-account, logs
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-12-08. Score: 2 | Accepted answer
  
  The advanced logging tables do not have an api4 entity. Even if they did, the civireport that shows you the changes uses a diffing algorithm you'd have to somehow replicate because the advanced logs do not store *changes*, they store *copies* of the changed record.
  
  What you're able to get in your description is coming from various fields on the contact record and from civicrm\_log (the Log api4 entity - which is not the advanced logging and just has some basic info). I don't think you'll be able to get much more than what you've got, except you haven't mentioned Advanced Search - it has a changelog section which is basically the same as civicrm\_log, but you can make a saved search from it.
  
  > **Comments:**
  > **username_0**: Thank you for confirming what isn't possible nowadays. I will try Advanced Search + Profile, then.  
  
  ---
  
  