I need to get the pc0 and pn0 and pv0 from the user input fields

    <script type="text/javascript">
       function changeText2(){
      var userInput0 = document.getElementById('userInput').value;
      var userInput11 = document.getElementById('userInput1').value;
      var userInput21 = document.getElementById('userInput2').value;
      window.open("/00ON0000000FOHS?pc0="+userInput0+"&pn0="+userInput11+"&pv0="+userInput21, "_bla");

    Here is a link : <a href="/00ON0000000FOHS?pc0=userInput0&pn0=userInput11&pv0=userInput21" id='test'>nothing here yet</a> <br/>
    <input type='text' id='userInput' value='Enter Search String Here' />
    <input type='text' id='userInput1' value='Enter Text Here' />
    <input type='text' id='userInput2' value='Enter Text Here' />
    <input type='button' onclick='changeText2()' value='Change Link'/>

it is showing in the url https://cs6.salesforce.com/00ON0000000FOHS?pc0=name&pn0=ne&pv0=teja but it is not filtering in the report

can any body tell me that what pc0:it si field name or label or api pn0 and pv0 toooo?

  • Does the report have at least 1 filter? I seem to recall that report has to have the "pc0" etc, you can modify the values at runtime but the filter must be created upfront... – eyescream Dec 16 '13 at 21:18
  • no filter are there it is a just plane report – Teja Dec 17 '13 at 4:51
  • can i able to do that in such way that when the user can click the add then pc1 has to take from user input .is it possible – Teja Dec 17 '13 at 10:27
  • I didn't play with it recently, maybe something changed... But I'm under impression that amount of filters and the fields HAVE TO be predefined & saved in the report. Runtime tweaks will work only on the operators & values. – eyescream Dec 17 '13 at 10:40
  • Then user has to give all the values of the – Teja Dec 17 '13 at 10:48

Your question seems odd to me, if you want to retrieve user input fields from a visualforce page, first you need to know what are the fields you need from it and then you can call those values from your apex methods, for example:

//this is the default value for this parameter
private String empresa = 'Global';

//this defines how to call the value
public String getEmpresa() {
   return empresa;
//setter method
public void setEmpresa(String empresa) { this.empresa = empresa; }

 //in the visualforce
 <td align="center" valign="top">
 <apex:actionRegion >
<td align="left" valign="middle">   
   <apex:selectList value="{!Empresa}" multiselect="false" size="1">
                                                          <apex:selectOptions value="{!items}"/>
                                                          <apex:actionSupport event="onchange" rerender="paquetes,paquetesDetalle" status="cargando"/>


Of course there are other ways to get it done, but if this is not your case be more specific about what you need


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.