We have a data action that returns multiple instances of arrays nested in the return. While flattening is not an issue, correlation of said data IS an issue. For example -
The issue we're seeing is that the name array has 3 entries, while the producers array has 2. As such, we can't correlate the data without the producers array containing SOME value (probably a null, or a string like "No Producer"). I've tried most everything to get the translation map or translation map default to set a not-set value as a null. Any help would be appreciated!
I need to correlate which producer comes from which record. if a caller enters a last 4 ssn value from a producer as an authentication, we are required to populate the name from the record and the producer from that record.
So assuming you can't convince the owner of the API that you are hitting to let you filter on last4 or last5, the next best approach would be to use an input parameter to do your translation map work, which unfortunately isn't currently allowed Using a foreach in the velocity would also probably make it possible to solve this issue, which is also not currently allowed.
Another thread is running into the same problems right now:
I opened up a ticket for my team to reconsider those limitation of data actions. In the meantime doing all of your work in a lambda seems like the easiest available approach to this problem.