Answers.Body: <p>The SearchKit interface does not let you do that (yet!). But if you get the query close to what you want and export it into a <code>.mgd.php</code> in your extension, then you might be able to add in the missing condition by hand.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-06T18:50:40.990Z
Answers.Text: Thanks Aidan,
  
  The data is going in via a drupal form so if push comes to shove I can just extract what I need from form results
  
  Thought I'd check I wasn't missing a trick by asking here
Answers.UserDisplayName: Craig Almond
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-05T09:24:10.760Z
Answers.LastActivityDate: 2023-05-05T09:24:10.760Z
Answers.UserDisplayName: Aidan
Body: <p>I've built a stack exchange query</p>
  <p>Search for activity type a</p>
  <ul>
  <li>return &quot;with&quot; contact, actiivity date- some custom data</li>
  </ul>
  <p>I want to add in custom data from another activity (type B) that happened on the same day for the same contact</p>
  <p>So i can include activity contacts activities- where type is type b</p>
  <p>Some contacts have more than one type b activity</p>
  <p>But the ones I'm interested in happen on the same day as the type a activity</p>
  <p>Can I use activity date a as a filter/comparison to limit the type b activities that show in mmy search?</p>
  <p>Does this even make sense?
  Is it possible?</p>
  <p>Any answers appreciated- here to learn!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-05T09:17:52.090Z
Comments.Text: Presumably 'stack exchange query' -> 'SearchKit query' :-)
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-06T18:48:48.030Z
Comments.Text: lol. ha-ha!  yup!
Comments.UserDisplayName: Craig Almond
Tags: <searchkit>
Title: Filter two activities by date in same searchkit query
ThreadText: # Filter two activities by date in same searchkit query
  
  (Asked by: username_0 on 2023-05-05)
  
  I've built a stack exchange query
  
  Search for activity type a
  
  * return "with" contact, actiivity date- some custom data
  
  I want to add in custom data from another activity (type B) that happened on the same day for the same contact
  
  So i can include activity contacts activities- where type is type b
  
  Some contacts have more than one type b activity
  
  But the ones I'm interested in happen on the same day as the type a activity
  
  Can I use activity date a as a filter/comparison to limit the type b activities that show in mmy search?
  
  Does this even make sense?
  Is it possible?
  
  Any answers appreciated- here to learn!
  
  **Tags:** searchkit
  
  > **Comments:**
  > **username_1**: Presumably 'stack exchange query' -> 'SearchKit query' :-)  
  > **username_0**: lol. ha-ha!  yup!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-05-05. Score: 1 | Accepted answer
  
  The SearchKit interface does not let you do that (yet!). But if you get the query close to what you want and export it into a `.mgd.php` in your extension, then you might be able to add in the missing condition by hand.
  
  > **Comments:**
  > **username_0**: Thanks username_1,  The data is going in via a drupal form so if push comes to shove I can just extract what I need from form results  Thought I'd check I wasn't missing a trick by asking here  
  
  ---
  
  