简体   繁体   中英

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 BI will delete Node A.

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!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM