0

I need to create a condition in Rules that evaluates whether a new file has been uploaded to afile field. The file field has an unlimited value setting and I need to send out notifications to users every time there is a new file.

EDIT After much experimenting, I came to the conclusion that the only way to do this would be by inserting custom PHP code inside the condition that checks if a new file has been uploaded to the field and return true or false.

I stress that checking if a field is changed/updated doesn't do the job, the code needs to check if there has been a new file added. I have been reading the Field API and it might be that "columns" is what needs to be compared, but I still need a lot of help with this.

  • Without properly investigating I would say it should be possible with the drupal.org/project/rules_conditional module, doing comparisons between the old and node node. – rooby Jan 30 '14 at 3:01
  • yes, but that also covers cases where a file has been removed, unfortunately – alouette Jan 30 '14 at 3:19
  • I think it could be managed. If I get some time in the next day I'll try it out. – rooby Jan 31 '14 at 0:32
  • thank you, that would be very helpful, because I have been trying to solve this for a couple of days now and I can't seem to find a solution – alouette Jan 31 '14 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.