2

For example, you want to copy the data for a file field with the machine readable name field_pdf into field_attachment

I been following the examples, but there is not an example for this action.

Is this possible with VBO and if so what is the code?

I would very much like to resolve this problem for myself and update the page on d.o

2

Here is a pure site-building approach:

  1. Install File Field Rules
  2. Define a new Rule Component (an "Action set"), named e.g. "Copy file"
    1. Define at least one input/parameter, e.g. node_source
    2. Define optionally a second input/parameter, e.g. node_target
  3. Configure your Rule component to perform a "Copy file field contents" action, with the following settings:
    1. Source entity => e.g. 'node_source'
    2. Destination entity => e.g. 'node_target': This depends on your case, you may even want to copy a file inside the same node, between different fields. You can in that case, use 'node_source' again as your target entity.
    3. Select the Source and Destination fields
    4. Save our component and you are done with Rules configurations.
  4. Back to your View and VBO field configuration, you can now select the "Copy file" action.

I tried this and was able to copy an image file between two different article nodes, hope it works for you too.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.