Combining existing tags and new tags seperately from each other on Update Contact module

Hi,

I have a problem and ChatGPT doesn’t seem to be able to solve the case. Although it seems I am fairly close to the solution, yet I need a human touch for this one! Here is the problem how I stated it to ChatGPT;

I have a problem with a scenario in Make that updates contacts in Teamleader. In order to update a contact, existing tags of the contact need to stay and new tags, coming from any other source through make, need to be added besides those existing tags.

In Make in the update contact module I do the following now in the ‘Tags’ field:

{{add(6.tags; 43.Interested in)}}

The 6.tags are the string of tags existing already in the contact profile (coming from module 6 in the scenario)
The 34. ‘Interested in’ is a new tag that needs to be added next to the existing tags.

The problem is that all tags are combined in to 1 tag. So if the existing tags are ‘tag1’ and ‘tag2’ and the new tag is ‘tag3’. It will make a tag that is called ‘tag1;tag2;tag3’ instead of splitting them.

Now chatGPT gives me 2x a Set Variable module with the formula if(isnotempty({{6.tags}}); split({{6.tags}}; ";"); array()) and a Set Variable module to union those 2 outputs union({{44.Existing tags}}; {{45.New Tags}})

Unfortunately in Make the output is in all 3 modules is exactly the formula, it doesn’t seem to run the formula actually. Am I missing something here? Here’s screenshots of the formulas.


Thanks for your help in advance.

@Henk-Operative Do you know maybe how to help me?

Thanks in advance!

Rob

Hi @Bamboologic As humans, it would be easier for us to understand if you could share the blueprint of your scenario, or at least screenshots (scenario overview, modules set-up, outputs, etc.). Thanks.

In the meantime, functions such as union() and isnotempty() do not exist in Make. You want to look into merge() (to combine arrays) , add() (to add values to an existing array) and ifempty().

The more details we have about your scenario, the better we can help you.

1 Like

As @Lauren_Moineau said, focus on getting the syntax right and make sure you use the right functions. Then you can focus on array methods to merge and deduplicate the array.

Cheers
@Henk-Operative

2 Likes