Body: <p>I have contacts that can be related to other by RelationshipA or RelationshipB.  I created a query in Search Kit to return the primary contact and the related contacts and everyone's email address.</p>
  <p>I grouped by the primary contact's ContactID and sorted by sortname.  For the information about the related contacts I set their fields in field transformation as list.</p>
  <p>All works fine, except.  The resulting data always lists the related contacts as RelationshipB followed by RelationshipA. I added a table and then added Relationship type to the sort fields set to descending.  This makes no difference.</p>
  <p>My question:  How can a sort the related contacts in the order I need (by relationship type) within each contact?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-22T09:36:39.613Z
Comments.Text: Order by contact, relationship type?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-08T16:26:57.277Z
Comments.Text: This question is a bit hard to follow.  Could you export your SearchKit query and edit your question to include it?
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <searchkit>
Title: Sorting by a list column in a Search Kit
ThreadText: # Sorting by a list column in a Search Kit
  
  (Asked by: username_0 on 2022-09-21)
  
  I have contacts that can be related to other by RelationshipA or RelationshipB. I created a query in Search Kit to return the primary contact and the related contacts and everyone's email address.
  
  I grouped by the primary contact's ContactID and sorted by sortname. For the information about the related contacts I set their fields in field transformation as list.
  
  All works fine, except. The resulting data always lists the related contacts as RelationshipB followed by RelationshipA. I added a table and then added Relationship type to the sort fields set to descending. This makes no difference.
  
  My question: How can a sort the related contacts in the order I need (by relationship type) within each contact?
  
  **Tags:** searchkit
  
  > **Comments:**
  > **username_1**: Order by contact, relationship type?  
  > **username_2**: This question is a bit hard to follow.  Could you export your SearchKit query and edit your question to include it?  
  
  ---
  
  ## 0 answers
  
  