+ Start a Discussion

CSV File Parser in Apex

Hi ,

Am parsing csv file using apex i have to do insert and update records , before insert or update i need to check any record have duplicate values,
Duplicate records are considering concatenation of 3 fields(index ,rep type , platform).
Before processing my csv file I need to check one validation rule
Concatenation of 3 fields records should not cross more than 100%
Index          Rep type     platform percentage
IBM               Gs              OS           30
IBM               GS             Os            80
Saas              WX            Apex       100
FA                  ABC            XYZ        80

In this situation  I need display error message in VF page you are entering more than  100 % to below records

Can any one tell me how to check duplicate records while inserting and updating and checking values is less than 100 % or not, if  more than 100% display error message.