function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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:selectList>
        <apex:inputField ??

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