I have a client CSV file that has Stores in the first column and Tasks in the cells across the header row. In each Task column, there is either an X, R, or blank (NULL). This is supposed to identify whether the Task is assigned to the Store in the first column, or a "rollover" task, or the task is not assigned to the store. Admittedly, this is a strange CSV format, but I am stuck with it.

The Tasks and Stores are already migrated. I am having a hard time trying to figure out how to tell my migrate class to iterate through the Tasks in the header row, and assign them (or not) to the Store(s) in the first column.

Any directions at this point is extremely appreciated.

See the image attached for reference.

enter image description here


I highly recommend looking into Feeds. It has a CSV importer where you can map the fields and headers to anything you want.

| improve this answer | |

We ended up getting a better csv format after all from the client. We used a common territory code as the key. Then we have a separate csv for the tasks, assigned to the common territory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.