This is something you can accomplish within the Apex controller for your Visualforce page.
You'd query something like
User u = [SELECT My_Picklist__c FROM User WHERE Id = :UserInfo.getUserId()];
Then, you can use the value of u.My_Picklist__c
to make choices about which sets of records you'd like to query and show for that user, even using the new switch
construct:
switch on (u.My_Picklist__c) {
when 'Value__one' {
// Do something
}
when 'Value__two' {
// Do something
}
}
Be aware that your Apex controller will enforce sharing rules and visibility, if that's part of your objective, only if it is declared with sharing
. Otherwise, you'll query records without regard for ownership, org-wide defaults, and sharing rules.