I have a CSV list and am trying to merge fields from different rows into one field...

Unique ID, Item, Value
1, Book, Blue
1, Book, Red
1, Book, White

I am importing a product display and want to have one taxonomy field with Blue | Red | White.

Would I use Implode for this?

I was thinking of Rewrite, but not sure how to append the current value.

Thanks,

Bobby

Comments

arkjoseph’s picture

I am trying to do the same as well. Glad I came across your post.

You might want to try this: http://drupal.org/node/1063434 and try the patch.

Unfortunately, I am in 6.x so not seeing any support as of yet. I am attempting to use explode ( %n ) for a value separator but imports are not seeing the new rows as a new line i guess and instead, creating new records per each row.

- Thanks and post back !

acidpotato’s picture

Assigned: Unassigned » acidpotato
Status: Active » Closed (fixed)

If it is a CSV file you are importing from then my default answer would be to change the csv file itself to make importing it into Drupal easier. Because if you import multiple records with same unique id assuming they are marked as unique in feeds, feeds may only import the first record. That will just update/replace the nodes or create duplicate nodes based on your feeds settings and thats not what you probably want.