# Action to merge three tags into one and separate them again

**URL:** <https://community.mp3tag.de/t/action-to-merge-three-tags-into-one-and-separate-them-again/59511>\
**Category:** Support\
**Created:** [December 26, 2022, 6:55am UTC](https://community.mp3tag.de/t/action-to-merge-three-tags-into-one-and-separate-them-again/59511 "2022-12-26T06:55:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lem](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@Lem](https://community.mp3tag.de/u/Lem)\
**Post date:** [December 26, 2022, 6:55am UTC](https://community.mp3tag.de/t/action-to-merge-three-tags-into-one-and-separate-them-again/59511/1 "2022-12-26T06:55:16Z")

</div>

I am trying to create two actions:

**1.** An action to take the content of 3 specified tags and have the values merged into a single _comma and space_ separated string.

For example:

```auto
Tag1 = ABC
Tag2 = xyz
Tag3 = 123

NewTag = ABC, xyz, 123 

```

  

**2.** An action to reverse this process by reading the NewTag and separating the string back into its constituent values (it will always be the same 3 tags).

Example:

```auto
NewTag contains = 789, JKL, 456

789 copied to Tag1
JKL copied to Tag2
456 copied Tag3

```

(the comma and space should be omitted when writing back to the individual tags).

Can anyone show me how to do this please?

Thanks.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [December 26, 2022, 7:24am UTC](https://community.mp3tag.de/t/action-to-merge-three-tags-into-one-and-separate-them-again/59511/2 "2022-12-26T07:24:36Z")

</div>

> [@Lem](#):
>
> ```auto
> Tag1 = ABC
> Tag2 = xyz
> Tag3 = 123
> 
> NewTag = ABC, xyz, 123 
> 
> ```

Create an action of the type "Format value" for the field NEWTAG  
Format string: %tag1%, %tag2%, %tag3%

> [@Lem](#):
>
> ```auto
> NewTag contains = 789, JKL, 456
> 
> 789 copied to Tag1
> JKL copied to Tag2
> 456 copied Tag3
> 
> ```

Create an action of the type "Guess value"  
Source: %newtag%  
Target pattern: %tag1%, %tag2%, %tag3%  
(This only works, if the comma is really the unique separator.)

---

<div class="post-metadata">

**Author:** ![Lem](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@Lem](https://community.mp3tag.de/u/Lem)\
**Post date:** [December 26, 2022, 7:50am UTC](https://community.mp3tag.de/t/action-to-merge-three-tags-into-one-and-separate-them-again/59511/3 "2022-12-26T07:50:41Z")

</div>

Thank you for the easy to follow clear instructions.

These both work perfectly!

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [January 25, 2023, 7:51am UTC](https://community.mp3tag.de/t/action-to-merge-three-tags-into-one-and-separate-them-again/59511/4 "2023-01-25T07:51:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
