How to create multiple records from 1 value with multiple data

I need to know what I can do to go from, for example, a Value: 200kg, 100kg to 2 values: 200kg
100kg and be able to put it in a database causing 2 records to be created (in this case) but there could be many more
image
image

You can use an Iterator module to iterate the array to split them into multiple records (their own separate bundles).

For more information, see the Make Academy.

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 —

Getting Started

Help Centre Basics

Articles & Videos

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

I have already used the iterator and divided it, right? Now I would need to put those records into an airtable (see image)
cd0b5ba1a4b6bbbde1037a570bcc30c4e9087bd1 (2)

Could you provide the output bundle before the iterator? You might not need one.



image

So you’ve iterated an array incorrectly. An iterator only can iterate ONE array at a time, and you’ve inserted 4.

What you need to do is use a “Set Multiple Variables” module with whatever you are currently doing in the Iterator module.

Once you have done that, please provide the output bundle of the new module.

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. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format 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!

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

[
{
“fecha”: “28/08/2024”,
“Numero Factura”: “4114”,
“Retención”: “2”,
“Articulo”: “Cerdo”,
“unidades”: “2”,
“identificación animal”: “ES555252525225, ES123456789033”,
“precio €/kg”: “0.96€, 1.12€”,
“proveedor”: “Juan S.L”,
“cliente”: “David S.L”,
“Cantidad total kg”: “Vacío”,
“Kg del animal”: “200, 310”,
“código de explotación”: “ES123456789012”,
“Empresa Comprador”: “David Andres Petolescu”,
“Nombre Comprador”: “David”,
“C.I.F Comprador”: “Y5822526R”,
“Dirección Comprador”: “Miquel Ferrer Boira 1”,
“Provincia Comprador”: “Tarragona”,
“ZIP Comprador”: “43780”,
“Localidad Comprador”: “Gandesa”,
“Teléfono”: “641793505”,
“Email Comprador”: “manyy0644@gmail.com”,
“Código de Explotacion Cliente Pratum”: “ES123456789012”,
“Nombre de Cliente de Pratum”: “Juan Salamanca”,
“Nombre de la Explotacion de Cliente Pratum”: “Juan S.L”,
“Dirección Explotacion del Cliente Pratum”: “Carrer Riu Anoia 7”,
“Localidad Explotacion del Cliente Pratum”: “Tarragona”,
“ZIP Explotacion del Cliente Pratum”: “43006”,
“Provincia Explotacion del Cliente Pratum”: “Tarragona”,
“C.I.F Cliente Pratum”: “F2455345”,
“Email Cliente Pratum”: “fakedark2007@gmail.com”,
“Teléfono Cliente Pratum”: “641793505”
}
]

[
{
“Retención”: “2”,
“cantidad total en kg”: “”,
“Precio €/kg”: “0.96, 1.12”,
“kg del animal”: “200, 310”
}
]