# How to grab actor filter userid and send to email connector

**URL:** <https://community.ofelia.com/t/how-to-grab-actor-filter-userid-and-send-to-email-connector/4545>\
**Category:** Q&A\
**Created:** [15 May 2014 01:47 UTC](https://community.ofelia.com/t/how-to-grab-actor-filter-userid-and-send-to-email-connector/4545 "2014-05-15T01:47:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![terrytan1979](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@terrytan1979](https://community.ofelia.com/u/terrytan1979)\
**Post date:** [15 May 2014 01:47 UTC](https://community.ofelia.com/t/how-to-grab-actor-filter-userid-and-send-to-email-connector/4545/1 "2014-05-15T01:47:32Z")

</div>

Dear Sir/Mdm,

I have successfully created a actor filter with the following steps. My questions is how to grab the userid in the actor filter and put it to email connector? I am lost.

* * *

create one data variable:uid with datatype : long (that will store single user’s id)

now,  
in first task’s form take one select box , in available value paste following code .  
that will give list of all available user

import org.bonitasoft.engine.identity.\*;  
List users = apiAccessor.getIdentityAPI().getUsers(0, 200, UserCriterion.FIRST\_NAME\_ASC);  
Map\<String,Long\> combo = new HashMap\<String,Long\>();

for(User u:users)  
{  
combo.put(u.getFirstName(),u.getId());  
}

return combo  
return type :  
should be : java.util.map

now,  
in output operation :  
first filed - select that variable (uid) takes value of field - click on pencil (script) paste following  
def long l = Long.parseLong(field\_Select1);  
task 2 → actor → set actor filter → add Uid variable

Run process ,

Regards,  
Terry
