How to set a specific taxonomy with Rules during feeds import? Using Feeds, Drupal creates automatically a Rule "before saving a content imported by feeds".

In my XML file I've got a unlimited value field that goes into one unlimited value field in my content type and I would like to create a rule that populates another field in my content type with one specific term grabbed from the XML field.

i.e
One item in the XML file has got terms:

Fruit, Sicily, Oranges

Another item has got other terms:

Nut, Sicily, Chestnuts

From here I need to grab just Fruit or Nuts.

So I've created two Rules:

The first one checks if the field contains the term Fruit.


Event: Before Saving a node from xml feed
Condition: Data comparision TRUE with term ID of Fruit.
Action: Here I would like to grab Fruit.


The second Rules is similar to the first one, but it checks if it contains Nut.

I've tried to set the Action with Set data value -> Target field node:field-type:Taxonomy(Name) -> Set a fixed value. It does not work.

I would like to know how to set the Action. If it's not possible using Rules, how do I achieve this aim?

Thanks in advance.
Solution

Rules


Before saving a node from xml feeds
Data comparision TRUE with rem id Fruit
Set data value -> node:field-taxonomy-type -> click on "Switch to direct mode input" and it will show the terms for that Vocabulary.