Map variable

Hello, I’m new around here.

I’m having trouble figuring out how to map a variable (number 6 in print) within a Collection that’s inside an Array.
I’m not sure which formula to use in the Tools (set multiple variables).

If anyone can help, thank you in advance.


Welcome to the Make community!

It looks like you want to get the Meta Data item where the Key is “WooCommerceEventsOrderTickets”.

You can use the built-in function map

e.g.:

{{ map(META_DATA_ARRAY; "Value.1.1.WooCommerceEventsSeatingFields.fooeventsSeatNumberLaltcsmanu..."; "Key"; "WooCommerceEventsOrderTickets") }}

Replace the variable names above respectively, since your screenshot didn’t provide the full picture.

If you need further assistance, please provide the following:

Please provide the input and 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”.
Screenshot_2023-10-06_141025

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-input-bundle.txt (12.3 KB)
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:
    Screenshot_2023-10-02_191027

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!

3 Likes

It worked! :smiley:

The error was the capital letters.

Captura de Tela 2024-04-17 às 11.15.02

2 Likes

Hello again Samliew.

I have another problem to solve. The field I want to map is variable, every time it’s a new code, is it possible to map something like this?
Captura de Tela 2024-04-18 às 21.47.30
Captura de Tela 2024-04-18 às 21.48.44

Welcome to the Make community!

That looks like a new question, could you please create a separate topic for this?

While it’s tempting to continue an existing thread, a more effective approach would be to start a new topic. It helps other community users to respond to your query, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.

The “New Topic” link can be found in the top-right of the header:
Screenshot_2023-12-19_091207

2 Likes