cancel
Showing results for 
Search instead for 
Did you mean: 

Second of two sort snaps not sorting

brianrandolph
New Contributor III

I have a pipeline with two sorts. I sort on parent account id, do a join, and then sort on a company code. The data out of the second sort is not sorted by the company code, it is still the parent account id. Is there a way to accomplish this? Thanks!

Sort path = ‘$Root_Parent_Id__c’
Output from first sort on “Root_Parent_Id__c”:
[
{
“OnContact_Comp_Code__c”: “45DFKFSAT1”,
“Root_Parent_Id__c”: “001G0000011byEqIAI”
},
{
“OnContact_Comp_Code__c”: “DDWEVZZ001”,
“Root_Parent_Id__c”: “001G0000011byEqIAI”
},
{
“OnContact_Comp_Code__c”: “AACSADG001”,
“Root_Parent_Id__c”: “001G0000011byFJIAY”
}

second sort on ‘$Oncontact_Comp_Code__c’
output after second sort:
[
{
“OnContact_Comp_Code__c”: “45DFKFSAT1”,
“Root_Parent_Id__c”: “001G0000011byEqIAI”,
“input1_Id”: “001G0000011byEqIAI”,
“input1_OnContact_Comp_Code__c”: “DDWEVZZ001”
},
{
“OnContact_Comp_Code__c”: “DDWEVZZ001”,
“Root_Parent_Id__c”: “001G0000011byEqIAI”,
“input1_Id”: “001G0000011byEqIAI”,
“input1_OnContact_Comp_Code__c”: “DDWEVZZ001”
},
{
“OnContact_Comp_Code__c”: “AACSADG001”,
“Root_Parent_Id__c”: “001G0000011byFJIAY”,
“input1_Id”: “001G0000011byFJIAY”,
“input1_OnContact_Comp_Code__c”: “AACSADG001”
}
]

2 REPLIES 2

del
Contributor III

Brian, if you copy/pasted from your environment to this post, the issue is likely the letter casing on your sort path.

Notice the casing Oncontact vs. OnContact.

For some reason, Sort doesn’t throw an exception for invalid sort paths

brianrandolph
New Contributor III

Thanks! Second set of eyes always helps! I’ll try that!