Action Condition: field exists?

I've got an "email" action set up, which lists all the email addresses in the current set in a nice, tidy, comma-delimited list, ready to copy-and-paste for sending. However, I'm having trouble with the condition for it. I want it to show up if the current table has an "email" field. All I can figure out is checking $query['-table'], which works fine for normal lists, but fails if I have a relationship list. Is there a specific way to check if a field exists?
My current condition, incidentally, looks like this:
It shows up just fine on the Adult and Student tables, but doesn't appear at all in, say, the relationship from Production to Student.
My current condition, incidentally, looks like this:
- Code: Select all
$table == "adult" || $table == "student"
It shows up just fine on the Adult and Student tables, but doesn't appear at all in, say, the relationship from Production to Student.