I am trying to follow the guide on how to use the Split step but I am running into an issue. The fields I listed in
the “merge fields” section are not being pulled into the final dataset.
This is my flow.
The first calculator step does the following.
The Designations_Earned__c field comes in as a semicolon separated value and I use the split function to turn it into an array of values.
In the next step, Split, I identified the field “designation” as the array and want to merge the “Name” field across the records.
However when the data reaches the next Calculator step all I get is the split array values.
Per the Split documenation, the merged fields are not applied.
Thanks.
Hi there!
With regards to the issue at hand, the reason the merge is not working as expected is due to the array being purely value based (no key is present). It can’t merge a key value pair (from the “main” record with that of just a value.
What I would suggest you do is subsequent to your calc split (before the split step) is build up a reciprocal array with the key present in an additional calc. For example:
let inputRecord=input.record;
let designation2 = []
for (i = 0; i < inputRecord.designation.length; i++) {
designation2.push({
designationName : inputRecord. designation[i],
});
}
inputRecord.designation2 = designation2;
return inputRecord;
This will introduce a new array called designation2 with the key present. You can then split on this array, and merge in the Name. Please do let us know if you have any questions, or need further assistance.
This introduces a new question.
I am loading these records into a buffer for an API to search against. Is there a way to group the results so that if there is a match only one record per entity is returned?
Ex: In the screenshots above if the API passed “Erin” as search parameter for First Name, there would be two records returned. I would like to only have one instance of “Erin” returned. (FYI, the API could search on multiple fields not just the normalized field.)
I tried to see if there was a “Group By” option in the query builder for the API but I didn’t see anything.
Thanks
Mark
Hi Mark,
We do have a Group step available as illustrated below.
The below link assists on how to use the Group step:
Group | Synatic Help Center
To have one instance of the value returned, you can use the Deduplicate step as shown in the below image and add the field you want to have unique values for.