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
Karthikeyan ChandranKarthikeyan Chandran 

Populate record list based on the picklist value chosen?

Hi All,

I have a custom multi select picklist called "Groups__c" in user object. i want to display the users in custom VF page based on the selection from the picklist "Groups--c".

Can anyone help me to fix this ASAP?

Karthikeyan Chandran
Harish RamachandruniHarish Ramachandruni


<apex:page controller="harishrao" >

<apex:selectList id="countries" value="{!Group}"
        size="1" required="true">
 <apex:selectOptions value="{!countries}"/>
<apex:commoundbutton value="show" action = "show" />


public class harishrao
public list<user> usa group 
public string group {get;set;}
public List<SelectOption> getCountries()
  List<SelectOption> options = new List<SelectOption>();
   Schema.DescribeFieldResult fieldResult =
   List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
   for( Schema.PicklistEntry f : ple)
      options.add(new SelectOption(f.getLabel(), f.getValue()));
   return options;

public pagereference show (){

usa = [select id,name form user where Group__c = :group   ]

return null ;


Use thiscode and any issue ask me ,