You need to sign in to do that
Don't have an account?
Rakesh M
list problem
Hi,
My code is not giving an expected out put, Kindly check and update me. Please let me know how to get the data in rows. Below is my code.
public class Campaign1 {
public list<Account> acc{set;get;}
public campaign1(){
acc=[SELECT Industry,Name FROM Account WHERE Industry = 'energy'];
for(integer i=0; i<acc.size();i++){
System.debug(acc);
}
}
}
<apex:page controller="Campaign1" cache="true" contentType="text/csv#Campaign.csv" language="en-Us" >
<apex:repeat value="{!acc}" var="a">"{!a.name}"
</apex:repeat>
</apex:page>
Output:
United Oil & Gas Corp."XYZ Global Services (India)"YYY Broadcasting Pvt Ltd"XXX Academy For Skill And
Expected output:-
My code is not giving an expected out put, Kindly check and update me. Please let me know how to get the data in rows. Below is my code.
public class Campaign1 {
public list<Account> acc{set;get;}
public campaign1(){
acc=[SELECT Industry,Name FROM Account WHERE Industry = 'energy'];
for(integer i=0; i<acc.size();i++){
System.debug(acc);
}
}
}
<apex:page controller="Campaign1" cache="true" contentType="text/csv#Campaign.csv" language="en-Us" >
<apex:repeat value="{!acc}" var="a">"{!a.name}"
</apex:repeat>
</apex:page>
Output:
United Oil & Gas Corp."XYZ Global Services (India)"YYY Broadcasting Pvt Ltd"XXX Academy For Skill And
Expected output:-
United Oil & Gas Corp. |
XXX Academy For Skill And |
YYY Broadcasting Pvt Ltd |
XYZ Global Services (India) |
Can you try to iterate the values in PageblockTable like below VF page:
Let us know if that helps you.
Best Regards,
BALAJI
After dealing with your code the expected output is not coming.
Thanks for having interest in my query.
Regards,
Rakesh Mungelkar.
Please try with this code :
If it's help you, please mark my answer.
Regards,
Akshay
Thank you for reply.
Below is the output for your code. Still expected output has not come.
United Oil & Gas Corp.<br />"XYZ Global Services (India) Pvt."<br />"YYY Broadcasting Pvt Ltd"<br />"XXX Academy For Skill And"<br />
Regards,
Rakesh M.