Error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <=, >, >= or when the subquery is used as an expression - When trying to preview the results of a query

When trying to preview the results of a query you may run into this error message: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <=, >, >= or when the subquery is used as an expression 
If this issue is occurring when trying to output the Contact(primary) name in your query results this issue could be a result of an organization have multiple primary contacts. Try creating a query to identify organizations that have multiple primary contacts on their constituent record and then remove one of the primary contacts from the organization's record.

Query to identify organizations with multiple primary contacts
  1. Click analysis > information library > add an ad-hoc query
  2. Choose the constituents source view
  3. Click on Constituents at the top of browse for fields in and drag "is organization" from the middle column to include records where and set it equal to yes
  4. Drag Lookup ID from the middle column to results fields to display
  5. Under browse for fields in click on relationships and drag "is primary contact" to include records where and set it equal to yes
  6. Drag "is primary contact" from the middle column to results fields to display > Click on the "is primary contact" field that you just dragged to results fields to display > click on the sigma icon > mark count
  7. Click on the name field under results fields to display > click on the red 'x' to delete the name column
  8. Click preview results to identify any organizations with multiple primary contacts
Query of Organizations with multiple primary contacts

Edit the primary contact on a constituent record
  1. Click constituents > constituent search > search for and select the constituent
  2. Click on the relationships tab
  3. Click the drop down arrow next to the contact and click edit
  4. Click on the contact information tab
  5. Un-mark the primary contact field 
  6. Click save


If a different field in the results fields to display section is causing the error message then click Chat with Support with the name of the query, as well as the field that is causing the error if known.

Steps to Duplicate

  1. Click Analysis > information library > add an adhoc query > choose your query source view
  2. Add your filter and output fields to the query
  3. Click on the preview results tab

Environment

 Altru Arts & Cultural

Was this article helpful?