You need to sign in to do that
Don't have an account?
Øyvind Borgersen 10
Visualforce pageblocktable from two variables
Hi,
I've created an csv import file VFP page where we should display the filevalues to be imported and also a couple of values which is not imported.
I'm able to get the VFP to show the values shown in the csv file and should be uploaded, but not the values that should only be shown.
VFP:
<apex:pageblocktable value="{!vidList}" var="vid">
<apex:column value="{!vid.Case_ID__c}" />
<apex:column value="{!vid.Number_of_copies__c}" />
<apex:column value="{!vid.Registration_date__c}" />
</apex:pageblocktable>
Controller:
for(Integer i=1;i<csvFileLines.size();i++){
Videogram_sales_number__c vidObj = new Videogram_sales_number__c();
Case cas = new Case();
//Split by comma or semicolon
string[] csvRecordData = csvFileLines[i].split(',|\\;');
vidObj.Case_ID__c = csvRecordData[0] ;
vidObj.Number_of_copies__c = decimal.valueof(csvRecordData[1]);
vidObj.Registration_date__c = date.today();
vidList.add(vidObj);
I've created an csv import file VFP page where we should display the filevalues to be imported and also a couple of values which is not imported.
I'm able to get the VFP to show the values shown in the csv file and should be uploaded, but not the values that should only be shown.
VFP:
<apex:pageblocktable value="{!vidList}" var="vid">
<apex:column value="{!vid.Case_ID__c}" />
<apex:column value="{!vid.Number_of_copies__c}" />
<apex:column value="{!vid.Registration_date__c}" />
</apex:pageblocktable>
Controller:
for(Integer i=1;i<csvFileLines.size();i++){
Videogram_sales_number__c vidObj = new Videogram_sales_number__c();
Case cas = new Case();
//Split by comma or semicolon
string[] csvRecordData = csvFileLines[i].split(',|\\;');
vidObj.Case_ID__c = csvRecordData[0] ;
vidObj.Number_of_copies__c = decimal.valueof(csvRecordData[1]);
vidObj.Registration_date__c = date.today();
vidList.add(vidObj);