I’m trying to figure out how to map nested arrays, and despite looking through several threads here, I still can’t seem to figure it out.
Here’s the output from the webhook that triggers my automation:
I’d like to be able to map the record ID that is nested under [Bundle 1]->[Submission]->[Questions]->[1]->[Value]->[1]->[recordID].
I’ve figured out a workaround that involves me iterating the Questions array and linking those back to the parent Airtable record, but I’d really prefer to avoid this as it overcomplicates my workflow and adds unnecessary steps.
Thanks in advance for any guidance y’all can provide!
Here’s the output bundle btw, in case it’s helpful:
[
{
“formId”: “gKwjdCtKvqus”,
“formName”: “Test”,
“submission”: {
“submissionId”: “4f4d5acf-3bdd-40e4-99af-8e2b480228ca”,
“submissionTime”: “2024-06-22T15:01:30.698Z”,
“lastUpdatedAt”: “2024-06-22T15:01:30.698Z”,
“questions”: [
{
“id”: “ee86cFCcFKYXCrmQoEWynu”,
“name”: “Exam Name”,
“type”: “RecordPicker”,
“value”: [
{
“recordID”: “recbQB0jH9lMO1GRn”,
“___record_uninitialized”: true
}
]
}
],
“calculations”: ,
“urlParameters”: ,
“quiz”: {},
“documents”: ,
“scheduling”: ,
“payments”:
}
}
]
Welcome to the Make community!
Just expand the variables panel and directly select the property you want.
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
1 Like
Thanks so much! The issue is that there are multiple different values that are associated with that field (different survey questions), so I need a way to map them based on the collection name.
Does that make sense?
Welcome to the Make community!
Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
A.
Save each bundle contents in your text editor as a bundle.txt
file, and upload it here into this discussion thread.
Uploading them here will look like this:
module-1-output-bundle.txt (12.3 KB)
B.
If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:
-
Either add three backticks ```
before and after the code, like this:
```
input/output bundle content goes here
```
-
Or use the format code button in the editor:
Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.
This will allow others to better assist you. Thanks!
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
1 Like
Sure! Here’s the text file.
Untitled.txt (10.8 KB)
Thanks so much!
You’ll need to use the built-in function map
and get
or first
e.g.:
Has sub-array under “value”:
{{first(map(169.submission.questions; "value.1.Name"; "name"; "Which Exam?"))}}
Value is a string:
{{first(map(169.submission.questions; "value"; "name"; "Your First Name"))}}
Output
For more information, see Mapping with arrays link below:
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —
General
Help Center Basics
Articles & Videos
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
1 Like
This works! Thanks so much.
One more question - do you know how I could structure it so that it would return multiple values within an array (Ideally separated by “//”)?
Here’s the txt file:
Untitled.txt (11.2 KB)
As you can see, Section Type has two options.
No problem, glad I could help!
1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
- others can save time when catching up with the latest activity here, and
- allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!
4. Do join the unofficial Make Discord server for live chat and video assistance
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
Hey - thanks so much! Wondering if you could still respond to my question above?
[do you know how I could structure it so that it would return multiple values within an array (Ideally separated by “//”)?]
I’m not sure about that. In this Make community, you should always start a new thread for each question.