You need to sign in to do that
Don't have an account?
Gowkanapalli Janardhanreddy
how to avoid duplicate record in page block table based owner name in return statement in controller?
how to avoid dupliacte records based on owner name , and not show dupliacte owners in page block table .
can any one help me
can any one help me
NOTE: Please use the "Add a code sample" button (icon <>) to add code to increase readability and to make it easier to reference.
Return [Select musqot__Costcentre__r.musqot__cc_Owner__c,Costcentre__r.name,Costcentre__r.musqot__Email__c from musqot__Allocation_amount__c where Costcentre__c <> null and musqot__To_Plan__c =:workId limit 100];
vf page code:
<apex:pageBlockTable value="{!perentmembers}" var="pmi" columnsWidth="200,200,100,*" rendered="{!IF(perentmembers.size>0,true,false)}"> <!--<apex:column value="{!pmi.Costcentre__r.name}" headerValue="{!$Label.mem_Cost_center}" rendered="{!Level2}" /> --> <apex:column value="{!pmi.Costcentre__r.cc_Owner__c}" headerValue="{!$Label.mem_Name}" /> <apex:column value="{!pmi.Costcentre__r.Email__c}" headerValue="{!$Label.mem_Email}"/> <apex:column headerValue="{!$Label.mem_Role}" title="{!pmi.Costcentre__r.name}" >CC Owner</apex:column> </apex:pageBlockTable> </apex:pageBlock>
ouput
:
Hi Pcon,
this is my code am fetching different object records and displyaing on vf page. here user name same but records are diffferent , so dont want to display duplicate username ,i want only one user name .can giveme suggestion for this how to approach this task.
VisualForce Controller
VisualForce Code
NOTE: This code has not been tested and may contain typographical or logical errors.