So, I get my three bundles out of Airtable, and then I put those into a text document … the problem being, I want the bundles to go 1, 2, 3 … and, the bundles are coming out 3, 2, 1. How do I reverse the order of bundles?
Stay cool and thanks!
-S.
So, I get my three bundles out of Airtable, and then I put those into a text document … the problem being, I want the bundles to go 1, 2, 3 … and, the bundles are coming out 3, 2, 1. How do I reverse the order of bundles?
Stay cool and thanks!
-S.
Aggregate to an array.
In an Iterator module, use the built-in function reverse on the array.
Um … wut!?
– S.
I am having a bad time with Make: So far …
I can’t get Make to insert a hyperlink into Google Docs … MARKDOWN SHOULD WORK BY DEFAULT!
I can’t get Make to eliminate the double newlines in Google Docs … WHY IS AUTOMATION SOFTWARE INSERTING CHARACTERS THAT I DID NOT SPECIFY TO BEGIN WITH!? Make is inserting ALL of the newline characters in the first place! I didn’t specify ANY newline characters!
I can’t get Make to iterate over data in the way that I wish … Like, why are aggregations coming out 3, 2, 1 … when any human on the planet would want 1, 2, 3 ?!
The flow control is incredibly obtuse: HOW DO I TELL MAKE TO STOP LOOPING?! Every programming language on the planet has for loop … sigh …
I understand your frustration. Actually, Make is quite fun and easier to work with compared to other automation platforms like Zapier. But first you’ll need to take some time to understand the basic concepts – which is why I went through the tutorials first before I built my first scenario not too long ago.
If you don’t know what’s an Iterator module, or what’s a built-in function, I strongly recommend you take a quick look at the Make fundamentals in the Make Academy, where these features that would answer your question are covered:
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 —
parseDate
| Tokens for formatDate
You could also probably try using the Sort field in the Airtable module itself so the bundles are returned in the order that you specify instead of having to reverse the aggregated array after.
To expound on @samliew suggestion:
Here’s a simple bundle generator using Parse JSON of this structure:
[
{
"key1": "A"
},
{
"key2": "B"
},
{
"key3": "C"
}
]
The array aggregator in the second module combines these 3 bundles in the keys/values into 1 array
And finally we iterate this aggregated array and apply reverse()
array function on the results yielding the original bundles in reversed order:
[
{
"key1": null,
"key2": null,
"key3": "C",
"__IMTINDEX__": 1,
"__IMTLENGTH__": 3
},
{
"key1": null,
"key2": "B",
"key3": null,
"__IMTINDEX__": 2,
"__IMTLENGTH__": 3
},
{
"key1": "A",
"key2": null,
"key3": null,
"__IMTINDEX__": 3,
"__IMTLENGTH__": 3
}
]
here’s the blueprint for your convenience
blueprint (19).json (3.6 KB)
@alex.newpath WOW: Clear, concise, and answers exactly what I was asking. Bravo and thank you, Alex!
You’re welcome @S_Knows_Best – it takes a while to put together clear and concise answers to be sure. I don’t blame @samliew for his short answer because he spends a TON of time providing high quality answers elsewhere on this forum. I thought I’d just help out and explain what he was saying thinking he probably just didn’t have the time to work out a full answer. I hope this helps your efforts in your scenario building.
And remember you reap what you sow. Hopefully when you get good at Make you will share your knowledge back to the community.
I adjusted the scenario sample slightly naming the keys the same value and creating an array in one of the bundles so you can see clearly the reversing without the differently named keys that generate null values in the previous example.
blueprint (20).json (3.6 KB)