Condition Based on User Group in Scheduled Report Email or Report

Weverton
Tera Contributor

HI guys.

 

I would like to know if it's possible to set a condition in the Scheduled Email of Report or in the Report,  based on the groups the user belongs to. 

 

In my use case, I need the user to not receive the report if they are part of a specific group.

 

 

Weverton_0-1778514899769.png

 

 

3 REPLIES 3

Christopher Sik
Mega Guru

Can you add some more context this question?

Are you trying to send the report to members of one or more specific groups? If that's the case, you would use the Groups filter (pictured in the top half of your screenshot) to select the desired groups. Then the scheduled report would get sent to the members of those groups.

I forgot about that part. I need the user to not receive the report if they are part of a specific group.

I don't believe there is a no code way to exclude members of a specific group using the scheduled report form fields. But there is a the conditional check box on the form. If you check that, a condition field will appear that allows you to add a script which could achieve your goal. 

You could also create a scheduled job that adds users to a report group based on certain conditions. For example: Add all itil users who do not have a membership in Group A to Group B. This could be setup to run daily, hourly, etc based on the turnover frequency in your organization. 

Then set Group B as recipient group on your scheduled report.