Dear Friends,
I have four fields in default and existing module. i want set these fields value as 1 or 0 when i import a file. The file has a field like 'business_offering' , it has four values as in array. if the values occur in this fields, then assign the value for corresponding four columns.
I set this functionality when we create new record for all module. Suppose i import the file i can't assign the values ( 1 or 0 ). Where i will assign the value. I give the code following for create new records. ( but problem comes when i import the file)
$this->business_offering = explode('^,^', $this->business_offering );
if(in_array('MS',$this->business_offering)){ $this->ms="1";}
if(in_array('ME',$this->business_offering)){ $this->me="1";}
if(in_array('IT',$this->business_offering)){ $this->it="1";}
if(in_array('ML',$this->business_offering)){ $this->ml="1";}
Please help me with your Sample Code.
Thanking You!
Karthikeyan Thirugnanasambandam
insoft.com
karthikeyan.t@insoft.com


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks