0

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.

  1. Event: Before Saving a node from xml feed
  2. Condition: Data comparision TRUE with term ID of Fruit.
  3. 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.

1

Solution

Rules

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

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.