Population / Dynamic Group as Email Recipient

Which IIQ version are you inquiring about?

Version 8.3

Share all details about your problem, including any error messages you may have received.

Hello,

I’m creating a report that needs to be sent monthly to the managers of active identities. From what I’ve seen, only Identities and Workgroups can be defined as Emails Recipients.

Is there a way to send the report to a Population? If this isn’t possible, is there a way to change the users in a Workgroup dynamically?

Hi @bruno-co ,

You can get a list of identities within the population by applying the following logic.

  List emailList = new ArrayList();
  QueryOptions qo = new QueryOptions();
  GroupDefinition def = context.getObject(GroupDefinition.class,"Test-Population");
 Filter filter = def.getFilter();
  qo.addFilter(filter);
 List IdentityList = context.getObjects(Identity.class, qo);
  
 for(Identity identity:IdentityList){
    
    emailList.add(identity.getEmail());
  }

you can set this emailList to To address.

 EmailOptions emailops = new EmailOptions();
  
   emailops.setTo(Util.listToCsv(emailList));
2 Likes

Thanks for the reply @Arun-Kumar.

Is there a way to configure this logic in the report? Or do I have to change the process for sending emails?