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
srvas137srvas137 

search records in an object and display in visualforce page startdate and end date wise

my page consists one picklist and three textboxes for one  enter a text(related picklist) and one for start date and enddate and also one search button

picklist contains(account number,account name,fax,phone,employees)

if select account number and enter text as 123(suppose)

and set start date and end date and click a search button

 

when i click search button those related records display in pageblock

HariDineshHariDinesh

Hi,

 

This is possible through coding VFP and Apex Controller.

You might Expect answers for your problems here, but not the complete code what you need.

Please give a try for what you are looking for and if you have any issues please post here with proper explanation.

Then Board Members are happy to answer your questions and solve the problem.

 

I can give you code sample for something related your requirement.

Please go through it and try to implement you Requirement.

 

VFP

 

<apex:page controller="theController">
   <apex:form >
      <apex:pageBlock mode="edit" id="block">
         <apex:pageBlockSection >
            <apex:pageBlockSectionItem >
               <apex:outputLabel for="searchText">Search Text</apex:outputLabel>
               <apex:panelGroup >
                  <apex:inputText id="searchText" value="{!searchText}"/>
                  <apex:commandButton value="Go!" action="{!doSearch}" 
                                      rerender="block" status="status"/>
               </apex:panelGroup>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
        <apex:actionStatus id="status" startText="requesting..."/>
        <apex:pageBlockSection title="Results" id="results" columns="1">
           <apex:pageBlockTable value="{!results}" var="l" 
                               rendered="{!NOT(ISNULL(results))}">
              <apex:column value="{!l.name}"/>
              <apex:column value="{!l.email}"/>
              <apex:column value="{!l.phone}"/>
           </apex:pageBlockTable>
        </apex:pageBlockSection>
      </apex:pageBlock>
   </apex:form>
</apex:page>
                    

 Controller:

public class theController {

   String searchText;
   List<Lead> results;

   public String getSearchText() {
      return searchText;
   }

   public void setSearchText(String s) {
      searchText = s;
   }

   public List<Lead> getResults() {
      return results;
   }

   public PageReference doSearch() {
      results = (List<Lead>)[FIND :searchText RETURNING Lead(Name, Email, Phone)][0];
      return null;
   }

}

 

 

 

 

suvarna vennapusalasuvarna vennapusala
i want display table information inside the table using search button .....please tell me