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
SFDC@ChennaiSFDC@Chennai 

How to assign the list values for each particular fields

Hi My code is below, i can get 6 values in tem variable from foreRevRep List, but i should display all the amount fileds from temp.

List<Forecast_Revenue_Report__c> foreRevRep = [SELECT Forecast_Amount__c,Forecast_Month__c,opp_id__c FROM Forecast_Revenue_Report__c WHERE opp_id__c = :this.oppId];
        for(Forecast_Revenue_Report__c tem: foreRevRep){
            this.amount1 = ;
            this.amount2 = ;
            this.amount3 = ;
            this.amount4 = ;
            this.amount5 = ;
            this.amount6 = ;

        }

Thanks,
bob_buzzardbob_buzzard
I don't understand what you are trying to do here.  What does "I should display all the amount fields from temp' mean - are you displaying through Visualforce, a report or something else?