Skip to main content

Topic: Copy one field to another only if not empty (Read 776 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Emerelle
  • [*][*][*]
Copy one field to another only if not empty
I just found a very unpleasant feature of foobar. That is copying fields even if they are totally empty. So now I ended up with one tag being mostly filled with a questionmark (empty field I think?). I'd really need some help now to tidy up the mess, and more over, I'd like to know if there is a way to copy one field to the other only if field 1 is not empty, so I do not end up with empty fields.

  • prateek88
  • [*][*][*]
Copy one field to another only if not empty
Reply #1
If you are talking about to hide displaying empty fields you can use the [%Field_title_format%]
and there is a way to copy one field to another using third party component using simple title formatting.

hope this helps.

  • Emerelle
  • [*][*][*]
Copy one field to another only if not empty
Reply #2
Thanks for your reply.
I used the normal tf editor that you see from the properties dialogue. I found that a quite powerful tool, but I didnt quite expect it to copy empty (or rather, non-existant) fields onto existing ones. In fact, I copied "unsynced lyrics" over to "lyrics", which resulted in many emptied lyrics fields in the case where there was no unsynced lyrics tag. Oh well, lesson learned.

I could imagine there is a third party editor that lets me do what I intended to do only I dont know which one that could be.

  • prateek88
  • [*][*][*]
Copy one field to another only if not empty
Reply #3
I was talking about the Masstagger, but for copying one field to another so that empty fields don't mess with the previously filled fields you could use titleformat query to check if the field isn't empty then only to update, something like $iflonger(s1,s2,then,else).

  • Frank Bicking
  • [*][*][*][*][*]
  • Global Moderator
Copy one field to another only if not empty
Reply #4
You could search for lyrics MISSING prior to opening the properties.

  • Emerelle
  • [*][*][*]
Copy one field to another only if not empty
Reply #5
Thank you both prateek and Frank for your suggestions, I see now there are quite a few ways to get this done without losing any field values.
  • Last Edit: 16 July, 2012, 01:59:41 PM by Emerelle