Vivid
Vivid

Reputation: 449

How to fill date field via Rules in drupal

One content type in my drupal page (Drupal 7) has a date field. After importing start hour, start minute and duration (Integer values) from an XML file, I want to set date field of the node via Rules. It seems that I cannot access the start date, end date, duration and repeating of the date field.

Is there a solution to set the start date, end date, repeating, etc. ?

Node A
-- title (text)
-- start minute (integer)
-- start hour (integer)
-- end minute (integer)
-- end hour (integer)
-- duration (integer)
-- days (integer values)

Node B
-- title (text)
-- date (date field)

With Rules I want to loop every Node A contents and want to create Node B contents. On creating I want to set the date field with the values of Node A. The date field has options like "start date, end date and repeating". I want to set these values but there are no tokens for "repeating" in Rules.

Node A is just a helper node I used to import my values from an XML file with feeds. Feeds (with XML parser) cannot map different values (minute, hour, duration, repeating) to one date field. So I hope thata Rule could help me. After creating Node B I will delete Node A.

Upvotes: 0

Views: 1172

Answers (1)

Prashant Kanse
Prashant Kanse

Reputation: 782

You can use module scheduler

If your requirement is very specific, you can use execute php code under the action and update database records using query

Cheers!!!

Upvotes: 0

Related Questions