# How do I store values in variables

**URL:** https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456
**Category:** Support
**Created:** [January 16, 2011, 7:11pm UTC](https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456 "2011-01-16T19:11:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![FarCoded](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/9fc348/32.png) [@FarCoded](https://community.mp3tag.de/u/FarCoded)
#### Post date: [January 16, 2011, 7:11pm UTC](https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456/1 "2011-01-16T19:11:34Z")

</div>

I have not been able to locate the answer to this question in the Help, FAQ or other forum entries.

FAQ #15 Explains "How can I copy one field value to another field?"  
[Actions](https://community.mp3tag.de/t/967/15)  
However, I want to switch the contents of two fields.  
I have several circumstances where this is a valid action, but lets keep it simple:  
I have files where the ARTIST is actually the Title and the TITLE is actually the Artist.

The FAQ shows how to replace ARTIST with TITLE or vice versa, but then BOTH FIELDS will contain the same value.  
I need to be able to:  
1 - read the ARTIST value and temporarily store it (in a variable? strARTIST)  
2 - read the TITLE value and temporarily store it (in a variable? strTITLE)  
3 - write the strARTIST content into the TITLE field  
4 - write the strTITLE content into the ARTIST field  
5 - save and exit

Thank you in advance to anyone who can help me out.

FC

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [January 16, 2011, 7:44pm UTC](https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456/2 "2011-01-16T19:44:23Z")

</div>

> [@FarCoded](#):
>
> ...I have not been able to locate the answer to this question in the Help, FAQ or other forum entries.  
> FAQ #15 Explains "How can I copy one field value to another field?"

Read the FAQ #14:  
How can I swap the contents of 2 tag fields?  
[Actions](https://community.mp3tag.de/t/967/14)

Begin Action Group **Test 2011#20110116.Swap.TITLE.ARTIST.1** 

Action #1  
_Actiontype 7:_ **Import tag fields (guess values)**  
_Source format:_ **%TITLE%===%ARTIST%**  
_Guessing pattern:_ **%ARTIST%===%TITLE%**  
End Action Group **Test 2011#20110116.Swap.TITLE.ARTIST.1** (1 Action)

 

Or use this Action Group.

 Begin Action Group **Test 2011#20110116.Swap.TITLE.ARTIST.2** 

Action #1  
_Actiontype 5:_ **Format value**  
_Field:_ **TEMP**  
_Formatstring:_ **%TITLE%**

 

Action #2  
_Actiontype 5:_ **Format value**  
_Field:_ **TITLE**  
_Formatstring:_ **%ARTIST%**

 

Action #3  
_Actiontype 5:_ **Format value**  
_Field:_ **ARTIST**  
_Formatstring:_ **%TEMP%**

 

Action #4  
_Actiontype 9:_ **Remove fields**  
_Fields to remove (semicolon separated):_ **TEMP**  
End Action Group **Test 2011#20110116.Swap.TITLE.ARTIST.2** (4 Actions)

 

DD.20110116.2200.CET

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [January 16, 2011, 8:10pm UTC](https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456/3 "2011-01-16T20:10:06Z")

</div>

there are easier ways:

Action: Guess values  
Source format: %artist%|%title%  
Guessing pattern: %title%|%artist%

@Detlev:  
Sorry again, opened the window half an hour ago

---

<div class="post-metadata">

### Author: ![FarCoded](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/9fc348/32.png) [@FarCoded](https://community.mp3tag.de/u/FarCoded)
#### Post date: [January 17, 2011, 12:04am UTC](https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456/4 "2011-01-17T00:04:03Z")

</div>

> [@DetlevD](#):
>
> Read the FAQ #14:  
> How can I swap the contents of 2 tag fields?  
> [Actions](https://community.mp3tag.de/t/967/14)

Wow! Seriously? FAQ 14 was there the whole time?  
I am flabbergasted! I have no idea how I could have read through so much stuff, but not see the FAQ that was right there in front of me!  
The only thing I can think of is that I had "blinders on" by the time I re-read the FAQs. I had resorted to the forum search and had searched everywhere for "variable" "save" "store" "temp" -- I guess I never checked for "swap".  
Sorry.

FC

---

<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: [February 9, 2026, 12:22pm UTC](https://community.mp3tag.de/t/how-do-i-store-values-in-variables/11456/5 "2026-02-09T12:22:50Z")

</div>


