Hi. New user here, and I’ve hit a complete dead-end trying to populate a Word template.
I’m trying to download a record from Airtable, iterate over some one-to-many child records (in my test data there are 2), then populate a Word document using both the original record, and the child records in a loop.
The actual result I’m seeing is that only a single child record appears in the Word document.
Here’s the input and output of the array aggregator:
[
{
"id": "recxcFlePIxxsfUr8",
"Name": "Joe Bloggs"
},
{
"id": "recNjTlClX9LzgNK9",
"Name": "John Smith"
}
]
[
{
"array": [
{
"id": "recxcFlePIxxsfUr8",
"Name": "Joe Bloggs"
},
{
"id": "recNjTlClX9LzgNK9",
"Name": "John Smith"
}
],
"__IMTAGGLENGTH__": 2
}
]
But then the input to the Word template module only shows 1 item from the array:
[
{
"data": "xxx",
"values": [
{
"key": "CompanyName",
"value": "ABC Trading Ltd",
"valueType": "value"
},
{
"key": "RegNumber",
"value": "12345678",
"valueType": "value"
},
{
"key": "Directors",
"value": [
{
"entry": [
{
"key": "Name",
"value": "Joe Bloggs"
}
]
}
],
"valueType": "loop-section"
}
],
"fileName": "ABC Trading Ltd.docx"
}
]
If I remove the array aggregator, I get two Word docs, each containing one of the child records.
Can anyone see where I’m going wrong please?