+ Start a Discussion
Gaurav  PuranikGaurav Puranik 

Lookup field that searchs only the selected picklist value

Hi all,
I want to display lookup feild next to selectList dropdown in vf page. A selectList contains USER and Role in its dropdown. Now what I want here is, when user select User from dropdown and click on lookup icon it should search all Users.

Similarly when user select Role from Dropdown the lookup icon should search all Roles.

 <apex:selectList value="{!strSelectVal}" multiselect="false" size="1">
            <apex:selectOption itemLabel="User" itemValue="User"/>
            <apex:selectOption itemLabel="Role" itemValue="Role"/>
        <apex:inputField ??

Where strSelectVal is variable in class :-
public String strSelectVal    {get;set;}