Humanitix additionalFields collection

:bullseye: What is your goal?

Collect the additionalFields from the Tickets Array in Humanitix and capture the data for use

:thinking: What is the problem & what have you tried?

because the additionalFields are created to capture additional information from ticket sales (like you order multiple tickets, you can collect each tickets name, email, phone ect.). I need to access that data. when I try to map the data anywhere it is not in the list and I cannot find a what to pull the information across.
i have tried manually “coding” it get(map(10.additionalFields; “value”; “key”; “3”); 1) but nothing seems to produce a result…
nothing comes through, the result is empty and there is no errors, the data is just not there, even though it is coming through.

:link: Create public scenario page

https://us1.make.com/public/shared-scenario/AjBVF0ig4Jr/ilsau-education-events-certificate-h

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

1 Like

Welcome to the Make community!

Answer provided after explanation and example below.

Combining Map & Get (or First) functions to get Values from Arrays

The built-in functions map, get, first (or `last) allows you to access values within an array containing collections.

First, use the map function on an array, which returns another array of filtered values —
map(array; key; [key for filtering]; [csv-values for filtering])

Then, the built-in function get (or first/last) to get a specific, single item from the resulting array —
get(array; path)

You will get something that looks like these —

{{ get(map(array; "value"; "name"; "content-type"); 1) }}
{{ first(map(array; "value"; "name"; "content-type")) }}

Map Function Parameters: Step-by-Step

To easily remember how to use each of the parameters of the map function, think of it this way:

  1. From this array (of collections),
  2. I want to get all the the values for the property/key named _______,
  3. Where another property/key _______
  4. has the exact case-sensitive value _______

Example

1. From this array (of collections) user_column_data

2. I want to get all the the values for the property/key named string_value

3. Where another property/key column_id

4. has the exact case-sensitive value EMAIL

5. Output

e.g.:

{{ first(map(10.additionalFields; "value"; "questionId"; "693f5777487abd3d5...")) }}

:high_voltage: Make Input Markup: Copy-paste the above into the field, including start/end curly brackets for it to import as intended :warning:

Using Join Function to Transform an Array into a Single Text Variable

You can also combine map with join to join the values into a single text string —
{{ join(map( ... ); delimiter) }}

e.g.:

{{ join(map(array); ", ") }}

For more information, the documentation for the above functions can be found in the Help Centre and the “Mapping with Arrays” link below. You should also complete the tutorials in the Make Academy, especially Using get() and map() functions as this is the most important knowledge you need to understand so that you can successfully apply it when building scenarios using Make.

Links & Guides

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’d also recommend going through the Make Academy if you haven’t yet!

Learn Make

How-Tos

— @samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Hi @James_Lyons ,

Hope you already have some answers here. Still, please do refer to the details below, as they should help clarify the approach further.

Since the data can be nested or dynamic, using Make’s get() and map() functions is recommended to extract and transform the required values correctly.

Please refer to the documentation below for a detailed overview of how the get() and map() functions work in Make.com and how they can be applied in such scenarios.

https://help.make.com/array-functions#map
https://help.make.com/general-functions#get

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

I have tried this a few times and it is not working at all:

I am starting to wonder if there is something else going on as when i try to map the email address, I can only see the phone number and no other fields, but when you see what has been collected you can see multiple and it has the email. If i map the phone number it works and gives me the phone number, but not the email. the curious thing is that the phone number is the 4 and last in the list of the collection.

1 Like

Hey there,

The formula you have in column d looks correct. Hover over the variable called questionId to make sure this is the correct raw name and the id matches the one you are trying to get.

On a side note - is that array fixed? Does it always contain the same fields in the same order?