I’ve found a solution. Basically, loop through the list and check to see if the refnum equal the last refnum. If so, map field1 and field2. If it doesn’t, then appendToDocumentList. Then loop through the the list again and apply the same check and them add field1 and field2 to the list.
If anyone has any input, I would greatly appreciated. The solution that I came up with doesn’t work 100%. Wondering if this could be accomplish through flow service or writing custom java service.
I’ve done it all in flow. I believe I have it resolved this time. I had to have a placeholder for the first data and then added some more logic to see which $iteration I’m on and if the last id equals the current id and such. I think I could create the service a bit better but what I’ve done thus far will work.