Answers.Body: <p>Try adding &quot;Acknowlegment ID&quot; as a column to your search and then click the <code>Fx</code> button and select IF NULL to coalesce it with the id. Then use that as the id column for your smart group.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-23T19:17:14.260Z
Answers.Text: Thank you! This is what I had already been trying, however I'm not seeing the "if null" option in the drop-down when I add that to the columns in "select fields"- I only get average, first, last, count, etc. Any thoughts on why that would be?
Answers.UserDisplayName: Sarah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-23T19:34:12.703Z
Answers.Text: Ok I figured out why the option wasn't showing up - it was because I was aggregating results using "group by". So now I can make the appropriate column but then still am not seeing the option to use a calculated column to create a smart group. Am I missing this somewhere?
Answers.UserDisplayName: Sarah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-23T17:16:16.790Z
Answers.LastActivityDate: 2024-10-23T17:16:16.790Z
Answers.UserDisplayName: Coleman
Body: <p>I'm trying to use SearchKit to create mailing group for all of our organization's donors. The problem is that some of the donations come through a 3rd party account (DAF) but of course we want to thank the donors themselves rather than the DAF.</p>
  <p>Therefore, some donations contain a field called &quot;Acknowledgment Contact ID&quot; in which the contact information for the actual donor is stored. I can get SearchKit to find all of the appropriate information, and to group the contribution records using logic GROUP BY: IF NULL &quot;Acknowlegment ID&quot;, &quot;CONTACT ID&quot; - which works perfectly.</p>
  <p>The problem is that I'd like to then make a smart group which includes BOTH the Acknowledgment IDs and the Contact IDs. I can't figure out a way to make the search display both types of contact IDs in a single column, using the same conditional logic as the 'group by' criteria. Only the aggregation options are available on the &quot;Select Fields&quot; area.</p>
  <p>Obviously I could create two different smart groups and merge them, but I'm trying to be efficient here.</p>
  
Tags: <contacts><smartgroups><searchkit><condition>
Title: Using Comparison Logic in SearchKit Output
ThreadText: # Using Comparison Logic in SearchKit Output
  
  (Asked by: username_0 on 2024-10-23)
  
  I'm trying to use SearchKit to create mailing group for all of our organization's donors. The problem is that some of the donations come through a 3rd party account (DAF) but of course we want to thank the donors themselves rather than the DAF.
  
  Therefore, some donations contain a field called "Acknowledgment Contact ID" in which the contact information for the actual donor is stored. I can get SearchKit to find all of the appropriate information, and to group the contribution records using logic GROUP BY: IF NULL "Acknowlegment ID", "CONTACT ID" - which works perfectly.
  
  The problem is that I'd like to then make a smart group which includes BOTH the Acknowledgment IDs and the Contact IDs. I can't figure out a way to make the search display both types of contact IDs in a single column, using the same conditional logic as the 'group by' criteria. Only the aggregation options are available on the "Select Fields" area.
  
  Obviously I could create two different smart groups and merge them, but I'm trying to be efficient here.
  
  **Tags:** contacts, smartgroups, searchkit, condition
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-10-23. Score: 0
  
  Try adding "Acknowlegment ID" as a column to your search and then click the `Fx` button and select IF NULL to coalesce it with the id. Then use that as the id column for your smart group.
  
  > **Comments:**
  > **username_0**: Thank you! This is what I had already been trying, however I'm not seeing the "if null" option in the drop-down when I add that to the columns in "select fields"- I only get average, first, last, count, etc. Any thoughts on why that would be?  
  > **username_0**: Ok I figured out why the option wasn't showing up - it was because I was aggregating results using "group by". So now I can make the appropriate column but then still am not seeing the option to use a calculated column to create a smart group. Am I missing this somewhere?  
  
  ---
  
  