So I have a Airtable module that collect all my clients, I push that to a Iterator to bundle then a GPS module to take my location ( perfectly sorted in GPS ) and match distance of the veneus in distance form me.After the GPS module I need to sort the top 3 clients nearest to me in kilometer nearest to me by the GPS ) in a WA text to my rep. I have tried everything but found no way to so send only 3 results in the Text Aggregator nor by distance, any advice or am I daft?
The missing piece is that you need to sort the array explicitly and then limit it before it reaches the Text aggregator or WhatsApp. I hope this helps you!
firstly → what is the Airtable module producing as output and what are you iterating over?
Second → its either an array aggregator or a text aggregator, not both.
And lastly → you always aggregate the module that produces the extra bundles. Your screenshot is not very clear, but it looks like this is the airtable module, it is definitely not the gps module.
Thks so muchStoyan, the air table proces clients based on keywords, generate a list with latitude and longitude refined by their needs, then it goes to airtable, this goes to my GPS module which logs my sales person current position and calculate the distance from his position to those suitable spitted out by airtable. But now I cannot give him a list of 50 suitable suppliers, he needs 3, so I need from my GPS to sort the 3 closest to his location, send it to the text aggregator to send him the 3 closest. Possible or not
Yeah I dont think you need that iterator. So have the GPS module after the Airtable one. Then have the Aggregator module return one array (with the airtable module as the source). Then have another iterator with a sort() function applied to the resulting array so you get them sorted by distance, and then on top of that put a slice() function to get the top 3 items from the array. Then after that have the text aggregator build the complete text string with the three items.
“What specific Make.com module or tool do I use for the slice() function to get the first 3 items? I’ve checked Set Variable, Tools, and Array Aggregator but don’t see a slice option. Is it called something else in Make.com?”