1

With the Rules module, I collect a list of row (text value) from a view, then iterate the list (variable list_item) and add this action:

  • Create new entity of type xxxx, (variable entity_created);

I add a PHP action that extracts a substring from list_item, convert the substring in a Unix timestamp, and set a field "date" of entity_created.

The rule create only one entity, and not one entity for each item in list_item.

Does anybody know how to create one entity for each item in list_item?

  • Would you mind to put your answer separately and then check it as solved? it will help other members of the community to identify quickly the solution :D – cayerdis Dec 1 '12 at 18:57
  • Ok. sorry. 15 character minimum. – user11743 Dec 1 '12 at 19:16
  • ahem... i don't know how to check solved :( – user11743 Dec 1 '12 at 19:28
  • You can check here, It is said in there: To mark an answer as accepted, click on the check mark beside the answer to toggle it from hollow to green. Before and after images: meta.stackexchange.com/questions/5234/… – cayerdis Dec 1 '12 at 19:42
1

The answer is the one suggested in Creating Entities in a Rules loop creates one first entity only.

After an actions of entity create, or data set, add the "Save entity" Action, and click on the "Force saving immediately" checkbox below on the form. Without selecting the checkbox, the Rules module creates only the first entity.

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.