Hi @tylerlamparter I'm not sure if it's related to what @davidgollom259 reported, but I just struggled with a strange post response map script preview on a One-to-Many lookup. I'm adding this note to this topic because I suspect it's related.
My situation is pretty standard: Exporting order data, for each line on the order I lookup additional product attributes. The API payloads are messy and I need to filter the lookup results to grab only an array element I actually care about. I was planning to use a Post Response Map script for this, but the Input and Preview data is whacky!
My path to One-To-Many is 'lines' and I output mapped my lookup results to product_ex_data. I would expect to see Input preview like:
{
"postResponseMapData": [
{
"lines": [
{
"line_id": 14263214276915,
"product_id": 8059359985971,
"variant_id": 44195116941619,
"product_ex_data": [
{
"variant_id": 44195116941619,
"barcode": 843578102703
},
{
"variant_id": 441951169416198,
"barcode": 8435781027033
}
]
}
]
}
],
...
}
where the lookup results are located in the "many" record. Instead the Input preview looks like this:
{
"postResponseMapData": [
{
"lines": [
{
"line_id": 14263214276915,
"product_id": 8059359985971,
"variant_id": 44195116941619
},
{
"line_id": 14263214309683,
"product_id": 8059371782451,
"variant_id": 44195138928947
},
{
"line_id": 14263214342451,
"product_id": 8059786690867,
"variant_id": 44196141891891
}
],
"product_ex_data": [
{
"variant_id": 44195116941619,
"barcode": 843578102703
},
{
"variant_id": 441951169416198,
"barcode": 8435781027033
}
]
}
],
...
}
It's incorrect. If I actually run the flow and force an error I can see that the lookup data IS mapped to the child record as expected, but in the script editor you'd never know it.
I've worked around this, but still happy to review with anyone if interested.