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
Suraj DemgundeSuraj Demgunde 

i want to usesearch functionality for vf i added method and vf page search bar but its not search proper record by name ?

 public pagereference vendorsearch() {


  string tempInput ;
  tempInput = '%' + searchfpo + '%';
  IccMPPFpolst2 = new List < ICCWorkbench__c > ();

  // string  tempInput = '%' + searchtext + '%';
  if (loggedUser.Profile.Name == 'Customer Community Login User') {
   con = new ApexPages.StandardSetController(Database.getQueryLocator([select id, name,Organization__c,Supplier_Status__c,PO_Promised_Date__c,Ex_Factory_Date__c    from ICCWorkbench__c where Supplier_Status__c = :'Submitted To Supplier   '
    AND( Organization__r.name LIKE: tempInput OR name LIKE: tempInput) Order by PO_Promised_Date__c ASC
   ]));

  } 

  //IccMPPFpolst2=con.getRecords();

  con.setPageSize(10);
  getICCworkbench2();
  return null;


vf:
<apex:commandButton value="Search" action="{!vendorsearch}" style="float:right;width:45px;background:#cfeef8;height:25%; margin-right:0%;margin-top:5px;"/> <apex:inputText value="{!searchfpo}" style=" float:right;width:85px;margin-top:5px;"/>