How do I store values in variables


#1

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
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


#2

Read the FAQ #14:
How can I swap the contents of 2 tag fields?
Actions

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


#3

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


#4

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