Boolean functions in Action Groups?

I would like to create a couple of actions that function according to the file type they're used for, so that I don't have to select between multiple actions for flac, mp3 or mp4 every time. Hopefully that's possible.
I was looking at Boolean functions in Help but I can't exactly figure out how to configure them, so I would really appreciate if someone could give me an example.

Specifically I would like like to use "Remove fields except" actions that would remove different fields for FLAC and mp3 files. I would prefer an action group with seperate actions for each file type, so I can easily add other types in the future. For example something like this:

Action Group:

action 1: if selected file's extension is .mp3, remove fields except field1;field2;field3, otherwise do nothing

action 2: if selected file's extension is .flac, remove fields except field1;field2, otherwise do nothing

The remove fields except action does not support Scripting functions. The best you can do is use separate actions like you describe.

Or you can set up one action group like the following:

Begin Action Group _Script Test#TEST REMOVE EXCEPT fields in flac, mp3 + mp4

Action #1 Actiontype 5: Format value Field ______: REMIXER Formatstring: $if($eql(%_extension%,mp3),,%remixer%) Action #2 Actiontype 5: Format value Field ______: YEAR Formatstring: $if($eql(%_extension%,mp3),,%year%) Action #3 Actiontype 5: Format value Field ______: UNSYNCEDLYRICS Formatstring: $if($eql(%_extension%,flac),,%unsyncedlyrics%) Action #4 Actiontype 5: Format value Field ______: COMMENT Formatstring: $if($eql(%_extension%,flac),,%comment%)

End Action Group _Script Test#TEST REMOVE EXCEPT fields in flac, mp3 + mp4 (4 Actions)

Action #1 will remove REMIXER field if the extention is mp3
Action #2 will remove YEAR field if the extention is mp3
Action #3 will remove UNSYNCEDLYRICS field if the extention is flac
Action #4 will remove COMMENT field if the extention is flac

Thanks, I'll stick with my separate action groups and "remove fields except" then. It's simpler than writing actions for all possible fields.

By the way, how would I use...

Format value: TRACK: %_counter%/%_total_files%
(for mp3 files)

Format value: TRACK: %_counter%,
Format value: TRACKTOTAL:%_total_files%
(for flac files)

...in the same action group?

Begin Action Group _Script Test#TEST

Action #1 Actiontype 5: Format value Field ______: TRACK Formatstring: $if($eql(%_extension%,mp3),%_counter%/%_total_files%,%track%) Action #2 Actiontype 5: Format value Field ______: TRACK Formatstring: $if($eql(%_extension%,flac),%_counter%,%track%) Action #3 Actiontype 5: Format value Field ______: TRACKTOTAL Formatstring: $if($eql(%_extension%,flac),%_total_files%,%tracktotal%)

End Action Group _Script Test#TEST (3 Actions)

Brilliant, thanks.
Just one questions, though. What will the z values in those three functions do (%track%, %track% and %tracktotal%) if x values are not true (wrong extension)? Shouldn't the z values be empty?

You want to keep whatever is existing in that field regardless if you want the same actions in the one group. The z value corresponding to the format value keeps what's existing in that field (whether empty or filled).

Action #1 will take care of TRACK if it's an mp3

Action #2 will take care of TRACK if it's flac It all works itself out when you run the single action.

Got it! Thanks

And what about regular "Remove fields" action, does it support scripting?

No, please read help.mp3tag.de/main_scripting.html at the part where it says where scripting is available in mp3tag.