Need Help Mapping Country Names to IDs for Vincere Multi-Select Field
I’m trying to build a scenario in Make that sends selected countries to a custom multi-select field in Vincere. The countries come in as a comma-separated string, for example:
Finland, Sweden, Switzerland
I need to convert each country name into a numeric ID, like:
- Finland → 16
- Sweden → 25
- Switzerland → 26
- etc.
Then I want to send them to Vincere using this structure:
“field_values”: [16, 25, 26]
What I’ve Tried:
I’ve used map() like this:
{{map(split(“Finland, Sweden, Switzerland”; “,”); :country; switch(trim(country); “Finland”; 16; “Sweden”; 25; “Switzerland”; 26; null))}}
But I keep getting this error:
Failed to map ‘0.value’: Function ‘map’ finished with error! ‘{empty}’ is not a valid key.
I’ve tried adding/removing the colon, switching variable names, and even using hardcoded switch blocks like:
[{{switch(…)}}, {{switch(…)}}, {{switch(…)}}]
That works, but it’s not scalable or dynamic.
My Goal:
- Split a list of countries from a string
- Convert each country name into its ID
- Return an array of numbers like [16, 25, 26]
- Pass that array into Vincere’s multi-select field (field_values)
Has anyone done this before or have a workaround that works dynamically inside Make?
Thanks in advance!
Here are the countries and the IDs I want to map them to:
- South Africa → 1
- China → 2
- Dubai → 3
- Hong Kong → 4
- Indonesia → 5
- Japan → 6
- Malaysia → 7
- Singapore → 8
- South Korea → 9
- Thailand → 10
- Vietnam → 11
- Austria → 12
- Belgium → 13
- Czech Republic → 14
- Denmark → 15
- Finland → 16
- France → 17
- Germany → 18
- Ireland → 19
- Italy → 20
- Malta → 21
- Norway → 22
- Portugal → 23
- Spain → 24
- Sweden → 25
- Switzerland → 26
- The Netherlands → 27
- United Kingdom → 28
- Australia → 29
- New Zealand → 30
- USA → 31
- Canada → 32
- Antilles → 33
- Argentina → 34
- Brazil → 35
- Costa Rica → 36
- Mexico → 37