Howdy Drupaler,

Right, the module is working great... a rule is creating the file perfectly.. but how do I then get the fid of the file to 'set a data value' of a filefield to add the file to a node in Rules.

Answers on a postcard...

Members fund testing for the Drupal project. Drupal Association Learn more


silkogelman’s picture

I'm trying to accomplish this too (not succeeding very well yet)

My usecase is:
After a Drupal Commerce order is completed a PDF invoice is generated and that PDF should be inserted into a private file field so only the order owner can view the PDF invoice file.

Not sure if you're doing this yet, but the first step is to bring the field you want to write the file to into scope:

go to Rule - Conditions Section
Add a condition of type "Entity has field"
target the "base" entity type that is in scope.

For my case I added a file field to the order first, and to bring it into scope I did as you can see on the attached screenshot.

lsolesen’s picture

Simon Georges’s picture

killua99’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

Dear fellow Drupal enthusiasts,

I have set this issue to "Postponed (Maintainer needs more information)".

If not already done please add an issue summary and steps how to reproduce the problem.
And please read again, "Making an issue report".

Help about how to do this can be found on IRC and in the user groups.

After there is new information, please re-open the issue by changing the status to active.

This issue was edited with the help of Issue Helper

killua99’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Please open a new issue if you still have this problem.