Why, if I change the value of the source, which would write them to a single field, these same changes get into another field? For example, I have a file with ID product and its attributes (color and size). For SKU product I use pattern [id] - [size] - [color]. But I also have a field VendorSKU where to bring the original ID. But due to the fact that the original ID is changed for all fields, and gets VendorSKU entries such as "222-M-green". How do I use the plugins separately for each field?
Well, I decided to go to the trick: have as a source of non-existent field (OrirginalID) and added the plugin "Copy source value" and set the "From" ID. No result. I decided to check one more time, and instead of "Copy source value" used the "Rewrite" with the value "test". Also there is no result in the VendorSKU. Obtained if there is no such file orgiginalnom field, then it is not to be handled?

Comments

mortona2k’s picture

I have a similar problem:

I have 2 fields in my source that are mapped straight to 2 fields in the destination. But I also want to combine them to create the guid. I tried to map them both to guid in addition to the other fields they are mapped to, but feeds only keeps the second one.

By default feeds tamper will change the source values, which would basically stick the combined guid into both fields that should just be a straight import. I tried what aa2007 said, and created a fake source field, and tried to copy the values of the 2 fields into it. This doesn't work... seems like it's not copying any of the values.

mortona2k’s picture

Copy to guid (instead of from the other fields) almost works. However, I am left with the original problem, that mapping 2 different fields to a single one will throw away the first value instead of concatenating.

jay-dee-ess’s picture

Issue summary:View changes

I'm running into this issue as well -- not seeing results whether I "copy from" or "copy to" one field to another.

Has anyone figured this out?

pkej’s picture

I'm not sure exactly what you guys are trying to do, but I have a simple case where I need to extract different data from the same source, in my example a description tag in an XML-feed.

In my first destination, my body field, I use decode html entities + remove html tags to get a clean text into the body.

In my second destination, my image field, I use decode html entities + execute php code in order to run a regex to get the image I need.

As I said I don't know what you guys are doing, but couldn't you just send the original content to two different destinations in the mappings, and then do your work twice in feeds tamper? I agree that it defeats refactoring and keeping the code in one place, but it would work around your problems?

Best regards,
Paul

ngreenup’s picture

Feeds tamper appears to allow plugins based on the SOURCE only.. instead of the Destination. If the same source is used for two destinations there should be TWO areas to add plugins within feeds tamper that are independent of each other. I am 99% sure this is the way it used to work and I am not seeing why you would it to work like it is currently. Here is my example:

Source CSV has a column called "Arrival" and has a date and time value.
The node that is created on import has the field arrival time and another field (reporting time) that is a select list with the options AM and PM.
I want to use the Arrival column to populate both fields. The arrival time field uses the tamper plugin Unix timestamp. I would like to use feeds tamper to try and convert the timestamp to AM or PM depending on the time of day in the timestamp. But any plugins will apply to both destination fields. I believe tamper should be destination independent to allow different plugins to work independently with the same source.