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
NickDevNickDev 

Convert fields into rows using Apex?

I have an object that has mulitple fields such as Week_End_Date, Monday_Hours, Tuesday_Hours, Wednesday_Hours, Thursday_Hours, Friday_Hours

I'm trying to use Apex consumed by a Visual Force page to basically convert this into seperate rows - a bit like a pivot, like this:

Week_End_Date, Monday_Hours
Week_End_Date, Tuesday_Hours
Week_End_Date, Wednesday_Hours
Week_End_Date, Thursday_Hours
Week_End_Date, Friday_Hours

What would the best way to achieve this be?

Thanks
SalesFORCE_enFORCErSalesFORCE_enFORCEr
You are going the right way. Use <apex:pageBlockTable> or <apex:dataTable> or just create a html <table> inside <apex:repeat> in a visualforce page.