Adding an item to a Pipedrive array without overwriting the original values

Welcome to the Make community!

:up_arrow: This method most closely resembles the structure/fields in your first screenshot— an ARRAY of COLLECTIONS.

To update the array without overriding it, you first need to create a new collection with the same structure, then “add” it into the existing array.

The easiest way to do this, would be to use the JSON “Parse JSON” module:

{ "new_item": {
  "label": "other",
  "value": "1234567890",
  "primary": false
}}

Then, in the Phones field, toggle the “Map” button. This will allow you to map the existing phones array into that field.

Finally, you can use the built-in function:

  • add
    add(array; value1; value2; ...)

Here’s an example of how you can use this function:

{{ add(1.phones; 2.new_item) }}

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

Useful to Know

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

@samliew

2 Likes