# "Format value" action only reads first value when source tag contains a list of values

**URL:** <https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069>\
**Category:** Support\
**Created:** [July 31, 2022, 10:27pm UTC](https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069 "2022-07-31T22:27:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Horseflesh](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/d6d6ee/32.png) [@Horseflesh](https://community.mp3tag.de/u/Horseflesh)\
**Post date:** [July 31, 2022, 10:27pm UTC](https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069/1 "2022-07-31T22:27:34Z")

</div>

I wanted to create a "Format value" Action that simply copied the %albumartist% data to the %artist% field. What I found is that if %albumartist% contained more than one item separated by "\\" then only the _first_ value was copied to %artist%.

1. `albumartist` = `Foo\\Bar` and `artist` = _any text_
2. Run Action `Format value "ARTIST": %albumartist%`
3. Observe `artist` = `Foo` when `artist` = `Foo\\Bar` was expected

If copying only the first value is the expected behavior, what is the correct way to make an Action that copies a list of values from one tag to another?

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [July 31, 2022, 10:42pm UTC](https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069/2 "2022-07-31T22:42:35Z")

</div>

If you want to copy all values from %ALBUMARTIST%, you can use  
`$meta(ALBUMARTIST)`  
This will copy all existing ALBUMARTIST tags (you can see them with ALT + T) into 1 ALBUM tag, separated by a comma as default.

If you want to change this separator character to a - let's say semicolon - you can use  
`$meta_sep(ALBUMARTIST,;)`

You can find some details about metadata functions [here](https://docs.mp3tag.de/scripting/#metadata-functions).

---

<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:** [August 1, 2022, 7:52am UTC](https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069/3 "2022-08-01T07:52:18Z")

</div>

As an amendment:  
If you want to keep all existing entries, then try the following  
Format string: `new text\\$meta_sep(albumartist,\\)`  
where you enter for "new text" whatever you would have used in the "Format value" action.

---

<div class="post-metadata">

**Author:** ![Horseflesh](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/d6d6ee/32.png) [@Horseflesh](https://community.mp3tag.de/u/Horseflesh)\
**Post date:** [August 1, 2022, 4:15pm UTC](https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069/4 "2022-08-01T16:15:15Z")

</div>

Thanks! This is my first exposure to $meta\_sep(). There's ALWAYS something new to learn in mp3tag!

---

<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:** [August 31, 2022, 4:15pm UTC](https://community.mp3tag.de/t/format-value-action-only-reads-first-value-when-source-tag-contains-a-list-of-values/58069/5 "2022-08-31T16:15:26Z")

</div>

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