Help with Drupal Rules module
This project was successfully completed by NoSssweat for £100 GBP in a day.Get free quotes for a project like this
Project Budget£20 - £250 GBP
Completed In1 day
I have a Drupal 7 website that records my flock of sheep. I have a content type (Sheep Record) with various information about each sheep in it and another content type (Movement Record) to record any movements of sheep on or off the farm.
When I create a Movement record I choose the 'Moved from' and 'Moved to' locations (which are taxonomy terms) and then using Entity Reference and an Entity Reference View Widget, choose which animals are moved.
Currently, I have a field in the Sheep Record for 'Location', which is rendered from a View showing the most recent 'Moved to' field relating to that sheep.
My problem is that this field can't be used to sort the Sheep records by location in other Views etc - as some Sheep have numerous Movement Records referring to them, their Location field is not necessarily unique - I can show the latest 'Moved to' location in the Sheep record using a View, but it is just the latest in the list of Moved to locations referring to that sheep, sorted by date.
I think it should be possible to use Rules to set a field (ie Location) in the Sheep record when a Movement record that refers to that sheep is saved. That is to say, when a Movement record is saved, Rules cycles through all the Sheep records referred to in the Movement record and sets the Location field in each Sheep record to the Moved to field from the Movement record.
Then I would be able to sort the Sheep records by Location.
I have tried to get my ahead around using Rules in this way, but have failed.
Can anyone help me with this?
Browse Related Skills
Other things people do on Freelancer
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online