Hi, everyone! Quick help here please.
How can I join my date and times in an array such as:
08/08/202522:21:43
08/08/202521:44:55
08/08/202521:43:12
I need it to be an array as I’ll later check it agains another array through contains()
Hi, everyone! Quick help here please.
How can I join my date and times in an array such as:
08/08/202522:21:43
08/08/202521:44:55
08/08/202521:43:12
I need it to be an array as I’ll later check it agains another array through contains()
Welcome to the Make community!
You can use an Iterator and a Text Aggregator module to do that.
From your screenshot/output bundle, it appears that you have an ARRAY of items. What do you do when you have an array?
When you see an array in your module’s output, think of using an Iterator module.
In this example, this variable is an array of items (collections). You’ll want to map this array in an Iterator module.
Question: Have you tried mapping your array variable into an Iterator module, ran the scenario once, and view the output?
Next,
Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.
You can find out more about the other types of aggregator modules here:
Question: Which is the best aggregator do you think you’ll need for your use-case?
Here is an example of how your scenario could look like:
This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.
For more information, see “Mapping with arrays” in the Help Centre. You should also do the Make Academy, which also covers the use of Iterators & Aggregators.
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!