# Need Help about swap field content

**URL:** https://community.mp3tag.de/t/need-help-about-swap-field-content/61473
**Category:** Support
**Created:** [July 5, 2023, 12:03pm UTC](https://community.mp3tag.de/t/need-help-about-swap-field-content/61473 "2023-07-05T12:03:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)
#### Post date: [July 5, 2023, 12:03pm UTC](https://community.mp3tag.de/t/need-help-about-swap-field-content/61473/1 "2023-07-05T12:03:48Z")

</div>

Good morning my friends. Another request for technical assistance.

Imagine a field with two content options, for example "word1" and "word2".  
How do I exchange? Where it was "word1" becomes "word2".  
Where it was "word2" becomes "word1".  
What is this for?  
I have a collection of Brazilian songs on the pendrive, where the OBS field says "national" and American songs, where the OBS field says "foreign".  
To send a copy of this pendrive to a relative who lives in the USA, I need to reverse it.

Another example: my favorite songs, in the OBS field it says "mine", and the girlfriend's favorites, it says "girlfriend".  
To send a copy to the girlfriend, where it says "girlfriend" I will change it to "mine", and where it says "mine" I will change it to "boyfriend".

Thanks in advanced

---

<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 5, 2023, 12:49pm UTC](https://community.mp3tag.de/t/need-help-about-swap-field-content/61473/2 "2023-07-05T12:49:59Z")

</div>

You could start with the FAQ here:

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967/14):
>
> How to swap the contents of 2 tag fields? Example how to swap TITLE and ARTIST: Create a [new action](https://community.mp3tag.de/t/actions/967/2) in an existing action group or make a new action group. Action type: Guess values Source format: %title%~%artist% Guessing pattern: %artist%~%title% Note: The ~ sign is just used to separate the two fields, you could take any other sign that does not appear in your fields, e.g. ¢ or an extended unicode character like ∞ or ∑.

If this does not work for you, please show us a [screenshot](https://community.mp3tag.de/t/hints-for-asking-support-requests/56190#use-screenshots-to-exemplify-the-issue-2) from a real existing music file  
(pressing Alt + T or menu View - Extended Tags)

---

<div class="post-metadata">

### Author: ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)
#### Post date: [July 5, 2023, 1:33pm UTC](https://community.mp3tag.de/t/need-help-about-swap-field-content/61473/3 "2023-07-05T13:33:04Z")

</div>

The problem is to swap content in the **same** field, not swap the content between 2 different fields.  
It could be done using 3 Replace actions:

1. Replace "word1" with "xyxyxyxy"
2. Replace "word2" with "word1"
3. Replace "xyxyxyxy" with "word2"

---

<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: [July 5, 2023, 2:03pm UTC](https://community.mp3tag.de/t/need-help-about-swap-field-content/61473/4 "2023-07-05T14:03:21Z")

</div>

In that case, one could also try an action of the type "Format value" for that field  
Format string: `$if($eql(%fieldname%,word1),word2,word1)`

A filter should be applied so that really only files with the contents word1 or word2 are treated. Otherwise all other words would be replaced with word1.

---

<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 4, 2023, 2:04pm UTC](https://community.mp3tag.de/t/need-help-about-swap-field-content/61473/5 "2023-08-04T14:04:02Z")

</div>

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