I cannot seem to find a way to filter emails to only “Active” users.
i.e. when sending emails to all users holding a particular User Role, I don’t want to send to Inactive users.
Am I missing something obvious?
Hi Craig,
can you use a Text Formula to pull the user status through to the table from where the email is being triggered? Then have a criteria that only continues if the status is active.
Hugo
Hi Hugo, Yea have tried that approach.
Problem is that I am sending an email to the entire group who hold a certain User Role. And there doesn’t seem to be any place to define the criteria of (Status is Active) for the entire group (if that makes sense).
Just an ugly workaround suggestion. If the user is inactive then they arent logging in. So maybe as part of setting a user inactive, append xxxxx to the email domain too. That way the email that is generated will go nowhere. Like I said, an ugly workaround, but it solves the concern of emailing inactive users.
But, thinking about this more, how are you able to use an Email rule to send an email to all users in a particular role? That’s something I’ve wanted to do in the past but could never work out how…
Are you doing this from a task?
No, not doing it from a Task, but from the form Email rule itself. It was a real work around to make this work …
- Create a connection in the applicable table (object) to the role. Mine is Many to Many.
- Add this new connection field into the form. I just put it at the bottom of the form.
- Hide the field from view using this code:
/*Hide checkboxes in xxx form (for sending group email)*/
#view_551 #kn-input-field_656
{
position: absolute;
visibility: collapse;
}
- In the email recipients you can now select the User Role to email to all users.
Thanks for your suggestion about appending xxx to the email address. Ugly as you say, but better than emailing inactive users. I’ll have a play with that idea, and also I’ll put in a ticket to Knack as a suggestion.
Feel free to PM me if you can’t get it to work ![]()
one thing you can try is, create an another connection field which will have only Active Users.
and then use that field for Email Rule.
Yep. Maybe have the connection to the Accounts field and filter the connection by user Role contains rule and status is active. Instead of connection to the Role directly.
Unless I’m missing something, the filter option filters what is available to be selected on the form, but it doesn’t affect the emails. I think the email is not filtered. Would be very happy to be proven wrong on that, but that’s how it seems to work for me.