• mobile vistex
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 6
    Replies
Hi 
iam query a data like follwing
list<Header__c> obj = [ Select Employee__c,
                   Employee_First_Name__c,
                   Employee_Last_Name__c,
                    Total_YTD_Achievement__c,
                    Manager_ID__c,
                    Manager_ID_Descr__c,
                    Trend__c,
            ( Select Tracking_Number__c,
                            Department_Code__c,
                            Plan_Definition__c,
                            SIP_Amount__c,
                            SIP_Split__c,
                            Cal_YTD_SIP_Amount__c,
                            Actual_Amount__c,
                            Target_Amount__c,
                            Result__c,
                            Payment__c,
                           Cal_YTD_Achievement__c
                            from TrackingItem__r    )
                      from Header__c order by Quarter__c
                   //   where Employee_ID__c = :user 
                     ];

for(header__C k : obj){
da.add(k.Employee__c);
da.add(k.Employee_First_Name__c);
da.add(k.Employee_Last_Name__c);
da.add(k.Manager_ID__c);
da.add(k.Manager_ID_Descr__c);
da.add(k.Department_Code__c);}

when  iam adding the related child field it is giving error field not found.,..
how can i add  the related field to that list
Hi can we add a column dynamically based on a condition ......

i want to add <td> not apex:column
 
hi i have a map key called rowspan .i want to make use of rowspan in my vf page to only particular column . how can i do that .

this is my code .
<apex:repeat value="{!data}" var="list">
<apex:variable value="{!0}" var="index"/>
<apex:variable value="{!list['rowspan']}" var="rspn"/>
<tr>
<apex:repeat value="{!keys}" var="key">
<td rowspan="{!rspn+1}">
 
<apex:outputText value="{!list[key]}" rendered="{!IF(index <2 ,'true','false')}"></apex:outputText>
<apex:commandLink action="{!detail}" reRender="tab1" status="mystatus" value="{!list[key]}" rendered="{!IF(index >=2 ,'true','false')}">
<apex:param value="{!list['AG']}" assignTo="{!Agreementname}" name="AN"/>
<apex:param value="{!list['DVR'] }" assignTo="{!driver}" name="DR"/>
<apex:param value="{!key }" assignTo="{!indx}" name="ID"/>
</apex:commandLink>
 </td>
 <apex:variable value="{!index+1}" var="index"/>
</apex:repeat>
</tr>

</apex:repeat>

i want to get rowspan only to first td.
Hi iam trying  to build a page where iam creating my header in table through list. and data in my list<maps>, my problem is i cant adjust values according to header. iam apex class is 
public class test{
Integer k = 20;
public String  temvar;
public String  tem;
public Integer keycount;
 map<String,String> temp1{get;set;}
list<map<String,String>> temp = new list<map<String,String>>();
list<String> period= new list<String>();
Integer flag;
list<Agreement1__c> MainData = [select name,driver__c,period__c,sales__C,quantity__c from Agreement1__c order by period__c];
public test(){
  temvar = '';
  tem = ' ';
  
}

public list<String> getheader(){
for(Agreement1__C q:MainData){
 flag = 1;
 for(String p: period ){
                if(p == q.period__c){
                    flag = 0;
                }
            }
if(flag == 1){

 period.add(q.period__c);

}

}
keycount = (period.size() + 1)*2;
return period;

}




public list<map<String,String>> getdata(){
for(list<Agreement1__c> k: [select name,driver__c,period__c,sales__C,quantity__c from Agreement1__c order by name])
{
for(Integer i =0;i < k.size();i++){
 temp1 = new map<String,String>();


 

 Integer flag = 1;
          
          for(map<String,String> temp3: temp){ 
          
          
                   if(temp3.get('AgrName') == k[i].name){       
                   flag = 0;
               }
          }
          if(flag  == 1){
            temp1.put('AgrName',k[i].name);            
          }
          else{
            temp1.put('AgrName','');  
          }
              temp1.put('driver',k[i].driver__c);
          temvar=k[i].period__c + '_S';
          tem =k[i].period__c + '_Q' ;
   
    
    
          temp1.put('temvar',k[i].sales__c);  
          temp1.put('tem',String.valueOf(k[i].quantity__c));   
           
        
      
temp.add(temp1);
}

}
return temp;
}

}

my vf page is
<apex:page controller="test" sidebar="false" showHeader="false">
<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
    width:20%;
}
</style>
<apex:pageBlock >




<table>
<tr >
<th >Agreement Name</th>
<th>Driver</th>
<apex:repeat value="{!header}" var="c">
<td colspan="2" style="text-align:center">
<apex:outputText value="{!c}"></apex:outputText>
</td>
</apex:repeat>

</tr>
<tr>
<th></th>
<th></th>
<apex:repeat value="{!header}" var="c">
<th>Quantity</th>
<th>Sale</th>
</apex:repeat>
</tr>
<apex:repeat value="{!data}" var="j">

<tr>


<td>{!j['AgrName']}</td>
<td>{!j['driver']}</td>

<td> {!j['temvar']}</td>
<td>{!j['tem']}</td>


</tr>

</apex:repeat>


</table>

</apex:pageBlock>
</apex:page>

my page is geeting like following
User-added image


i want to get like following
User-added image

how can i adjust according to that index value. any idea plese help me
hi i want two compare two values in a loop for ex my code is
for(String sr : uniqueData){
        list<String> dr = sr.split('~',2); 
        agm = dr[0];
        dvr = dr[1];
}

here in my uniqueData there are 5 Strings . when ever i enter in to loop iam spliting the String and assigning it to two variables. now my question is if two strings in agm ae same i dont want to print it for ex{if i get teja in first iterator. and also teja in second iterator . i dont want that name }.  how can i compare first agm and second agm
 
hi iam trying to get data from map when i display on visualforce page it is giving error map key not found . but in my it is present . my apex code is 
<apex:page controller="test" sidebar="false" showHeader="false">
<apex:pageBlock >


<table>
<apex:repeat value="{!data}" var="j">

<tr>


<td>{!j['AgrName']}</td>
<td>{!j['driver']}</td>

<td> {!j['temvar']}</td>

<td>{!j['tem']}</td>


</tr>
<apex:outputText value="{!j}"></apex:outputText>
</apex:repeat>


</table>

</apex:pageBlock>
</apex:page>

and my controller is like following 
public class test{
Integer k = 20;
public String  temvar{get;set;}
public String  tem{get;set;}

list<map<String,String>> temp = new list<map<String,String>>();
public test(){
  temvar = '';
  tem = ' ';

}


public list<map<String,String>> getdata(){
for(list<Agreement1__c> k: [select name,driver__c,period__c,sales__C,quantity__c from Agreement1__c order by period__c])
{
for(Integer i =0;i < k.size();i++){
map<String,String> temp1 = new map<String,String>();


 Integer flag = 1;
          
          for(map<String,String> temp3: temp){ 
          
          
                   if(temp3.get('AgrName') == k[i].name){       
                   flag = 0;
               }
          }
          if(flag  == 1){
            temp1.put('AgrName',k[i].name);            
          }
          else{
            temp1.put('AgrName','');  
          }
          temvar=k[i].period__c + '_S';
          tem =k[i].period__c + '_Q' ;
          
          temp1.put('driver',k[i].driver__c);
          temp1.put('temvar',k[i].sales__c);  
          temp1.put('tem',String.valueOf(k[i].quantity__c));   
           
          
temp.add(temp1);
}

}
return temp;
}

}

please tell me how can i display that quantity field in visual force page
HI i have written a loop like
for(String x: <list>){
k=x[0];
l=x[1];

}


my question is how to compare values k..

 
HI my visual force page will be following
User-added image
my requirement is if same Agreement name is there and different drivers are there then i want to display only one name with rowspans . and i want to add subtotals(row) for each Agreement name . my page shoul like
User-added image
how can i do rowspan according to drivers count. my vf page code is
<apex:page controller="header" showHeader="false">

<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
    width:20%;
}
</style>
<apex:form id="theform" >
<apex:pageBlock >


<table>
<tr >
<th >Agreement Name</th>
<th>Driver</th>
<apex:repeat value="{!agrmnts}" var="c">
<td colspan="2" style="text-align:center">
<apex:outputText value="{!c}"></apex:outputText>
</td>
</apex:repeat>

</tr>
<tr>
<th></th>
<th></th>
<apex:repeat value="{!agrmnts}" var="c">
<th>Quantity</th>
<th>Sale</th>
</apex:repeat>
</tr>


<apex:repeat value="{!body}" var="bd">
<apex:variable value="{!0}" var="index"/>
<tr>
<apex:repeat value="{!bd}" var="cd">
  
<td>
<apex:outputText value="{!cd}" rendered="{!IF(index < 2,'true','false')}"></apex:outputText> 

<apex:commandLink action="{!method}" reRender="theform" status="mystatus" value="{!cd}" rendered="{!IF(index >= 2,'true','false')}">
<apex:param value="{!bd[0] }" assignTo="{!Agreename}" name="AG"/>
<apex:param value="{!bd[1] }" assignTo="{!drive}" name="dr"/>
<apex:param value="{!index }" assignTo="{!indx}" name="in"/>

</apex:commandLink>
</td>

<apex:variable var="index" value="{!index+1}"/>
</apex:repeat>

</tr>

</apex:repeat>

</table>


</apex:pageBlock>
</apex:page>
what changes i should made. how data i should send inorder to do row span
 
hi iam trying to group name  and order by period but giving above error how can i do that
my query is:
list<Agreement1__c> al = [select Name,driver__C,period__C,sales__c,quantity__c from Agreement1__C group By Name order by period__c ];
please tell me how can delete that error
 
hi i have a table where i want to do colspan from particular column. my table looks like following
User-added image
my problem is i want to do col span from jan to apr .my visualforce code is
<apex:page controller="header" showHeader="false">
<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
}
</style>
<apex:pageBlock >
<table>
<tr>
<apex:repeat value="{!agrmnts}" var="c">
<td>
<apex:outputText value="{!c}"></apex:outputText>
</td>
</apex:repeat>

</tr>

<apex:repeat value="{!body}" var="bd">
<tr>
<apex:repeat value="{!bd}" var="cd">
<td>{!cd}</td>
</apex:repeat>
</tr>
</apex:repeat>
</table>

</apex:pageBlock>
</apex:page>

how can make colspan. from jan to apr.(iam getting my header from controller in form of list)
hi i created a page which looks like following
User-added image
when i click on that links i should show another table and get the data from second object. here is my page code what can i do to acheive that.
<apex:page controller="header" showHeader="false">

<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
    width:20%;
}
</style>
<apex:pageBlock >
<apex:form >
<table onload="makecasesclickable()">
<tr>
<apex:repeat value="{!agrmnts}" var="c">
<td>
<apex:outputText value="{!c}"></apex:outputText>
</td>
</apex:repeat>

</tr>

<apex:repeat value="{!body}" var="bd">
<apex:variable value="{!0}" var="index"/>
<tr>
<apex:repeat value="{!bd}" var="cd">
  
<td>
<apex:outputText value="{!cd}" rendered="{!IF(index < 2,'true','false')}"></apex:outputText> 
<apex:commandLink value="{!cd}" rendered="{!IF(index >= 2,'true','false')}"/>
</td>
<apex:variable var="index" value="{!index+1}"/>
</apex:repeat>
</tr>
</apex:repeat>

</table>
</apex:form>

</apex:pageBlock>


</apex:page>

in command link tag how can i redirect to class where i can get data.
hi iam trying to build a visual force where i am getting my data from a controller in form of lists. i want to dispaly the page like following
User-added image

iam giving my visualforce page code  
<apex:page controller="dataController" showHeader="false">

<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
    
}



</style>

<apex:pageBlock >
<table>
<tr>
<apex:repeat value="{!tableHeader}" var="header">
<td>
<apex:outputText value="{!header}"></apex:outputText>
</td>
</apex:repeat>

</tr>

<apex:repeat value="{!tableBody}" var="tbody">
<tr class="lnkdsble" >
<apex:repeat value="{!tbody}" var="rdata">

<td>
<apex:outputText value="{!rdata}"/>

</td>

</apex:repeat>
</tr>
</apex:repeat>
</table>

</apex:pageBlock>
</apex:page>

please tell me how can i put links for those paticular columns ie jan feb mar so on..  i dont want links for first two columns
hi my visualforce page will be like following
User-added image
iam getting that data from my controller . i want to put hotspots under values(  ie column jan to apr). when i click on that i want to get data from another table. please tell me how i can do this.
hi iam trying to built a list where i want to make to fields as unique . how can i achieve this .  iam trying pair numbers but giving error to me. is any other method is there ?
hi i have requirement where i have to built visual force page.. my data will be stored in db like followingUser-added image



i want to show my visual force like following

User-added image



i have written some sample code  to dispaly header..
 
public list<String> getagrmnts(){
        m.put('Name','');
        m.put('Driver__c','');
        period.add('Agreement no');
        period.add('Driver');
        headerKeys.add('name');
        headerKeys.add('driver__c');
        list<String> tempStr = new list<String>{};
        for(Agreement1__c a : al){
            flag = 1;
            tempStr.add(a.name);
            tempStr.add(a.driver__c);
            //if(period.indexOf(a.period__c)==-1)
            for(String p: period ){
                if(p == a.period__c){
                    flag = 0;
                }
            }
            if(flag == 1){
                m.put(a.period__c,'');
                headerKeys.add(a.period__c);
                period.add(a.period__c);
            }    
        }
        return period;    
    }

and page code to display header is
<apex:page controller="header">
<apex:pageBlock >
<table>
<tr>
<apex:repeat value="{!agrmnts}" var="c">
<td>
<apex:outputText value="{!c}"></apex:outputText>
</td>
</apex:repeat>
</table>
</apex:page>

please tell me how can i fill data to that table i want to mshow like above
hi iam actually trying to prepare a table where i want to push map data into list ? what is the approach to move data of map to a list in apex
hi,
i  have 4 fields (agreement,driver,period,sales) in my custom object.in db it will save like followingUser-added image 
i want to show in visual force page like following
User-added image
please help me how can fill sales based on period values. any links is there please send me

 
hi iam new to salesforce i want import some data into salesforce from SAP using .net connector by bulk API i there any document or links to create connection. please tell me the procedure to connect to salesforce
hi iam new to salesforce i want to send SAP data from my organisation to Salesforce through bulk api .what is the correct approach any guidence please tell me i want step by step process. please send me any links or videos are present in moving data from organisation to salesforce  
hi i have a map key called rowspan .i want to make use of rowspan in my vf page to only particular column . how can i do that .

this is my code .
<apex:repeat value="{!data}" var="list">
<apex:variable value="{!0}" var="index"/>
<apex:variable value="{!list['rowspan']}" var="rspn"/>
<tr>
<apex:repeat value="{!keys}" var="key">
<td rowspan="{!rspn+1}">
 
<apex:outputText value="{!list[key]}" rendered="{!IF(index <2 ,'true','false')}"></apex:outputText>
<apex:commandLink action="{!detail}" reRender="tab1" status="mystatus" value="{!list[key]}" rendered="{!IF(index >=2 ,'true','false')}">
<apex:param value="{!list['AG']}" assignTo="{!Agreementname}" name="AN"/>
<apex:param value="{!list['DVR'] }" assignTo="{!driver}" name="DR"/>
<apex:param value="{!key }" assignTo="{!indx}" name="ID"/>
</apex:commandLink>
 </td>
 <apex:variable value="{!index+1}" var="index"/>
</apex:repeat>
</tr>

</apex:repeat>

i want to get rowspan only to first td.
hi iam trying to group name  and order by period but giving above error how can i do that
my query is:
list<Agreement1__c> al = [select Name,driver__C,period__C,sales__c,quantity__c from Agreement1__C group By Name order by period__c ];
please tell me how can delete that error
 
hi i created a page which looks like following
User-added image
when i click on that links i should show another table and get the data from second object. here is my page code what can i do to acheive that.
<apex:page controller="header" showHeader="false">

<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
    width:20%;
}
</style>
<apex:pageBlock >
<apex:form >
<table onload="makecasesclickable()">
<tr>
<apex:repeat value="{!agrmnts}" var="c">
<td>
<apex:outputText value="{!c}"></apex:outputText>
</td>
</apex:repeat>

</tr>

<apex:repeat value="{!body}" var="bd">
<apex:variable value="{!0}" var="index"/>
<tr>
<apex:repeat value="{!bd}" var="cd">
  
<td>
<apex:outputText value="{!cd}" rendered="{!IF(index < 2,'true','false')}"></apex:outputText> 
<apex:commandLink value="{!cd}" rendered="{!IF(index >= 2,'true','false')}"/>
</td>
<apex:variable var="index" value="{!index+1}"/>
</apex:repeat>
</tr>
</apex:repeat>

</table>
</apex:form>

</apex:pageBlock>


</apex:page>

in command link tag how can i redirect to class where i can get data.
hi iam trying to build a visual force where i am getting my data from a controller in form of lists. i want to dispaly the page like following
User-added image

iam giving my visualforce page code  
<apex:page controller="dataController" showHeader="false">

<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
    
}



</style>

<apex:pageBlock >
<table>
<tr>
<apex:repeat value="{!tableHeader}" var="header">
<td>
<apex:outputText value="{!header}"></apex:outputText>
</td>
</apex:repeat>

</tr>

<apex:repeat value="{!tableBody}" var="tbody">
<tr class="lnkdsble" >
<apex:repeat value="{!tbody}" var="rdata">

<td>
<apex:outputText value="{!rdata}"/>

</td>

</apex:repeat>
</tr>
</apex:repeat>
</table>

</apex:pageBlock>
</apex:page>

please tell me how can i put links for those paticular columns ie jan feb mar so on..  i dont want links for first two columns
hi,
i  have 4 fields (agreement,driver,period,sales) in my custom object.in db it will save like followingUser-added image 
i want to show in visual force page like following
User-added image
please help me how can fill sales based on period values. any links is there please send me

 
hi iam new to salesforce i want to built a visual force page like a matrix report.how can i do that?
what is the approach any examples please send the links. my page should look like User-added imagefollowing