There is %g (or $genre), the same variables are available in everywhere they are used, even if they are not listed, and for most fields you can just use $fieldname.
Be warned that songs may have multiple genres, in this case %g will be replaced by "genre1, genre2, genre3".