Skip to main content
added 10 characters in body; edited tags; edited title
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 51
  • 183

Rules - Can only Access Loops Tokens How to concatenate all token values of a list in "Data Selection" modea single field within a Rules loop?

Using Drupal 7, I am attempting to send a list of uploaded files on a newly created node via email.

In a content type, I have a File Field that allows unlimited values.

Within RulesRules, I created a loop calling the current item "current_file".

enter image description here

I am trying to concatenate all of the values into one longtext field called "file_list".

I intend to use the token for the value of "file_list" in the body of an email.

Unfortunately, I am unable to do so.

While in Data Selection mode, I can access the tokens created by the loop:

enter image description here

However, while in Direct Input mode, the tokens are not available to me. They are not listed in the "Replacement patterns" section.

When I attempt to fill the value with the following, I have no success:

[node:field-file-list] [current-file:file:url] 

What can be done to make the tokens available to me in Direct Input mode?

If I am doing this incorrectly, is there a different way for me to concatenate all of the URLs of each file so that I can put it in the body of an email action?

Thank you.

Rules - Can only Access Loops Tokens in "Data Selection" mode

Using Drupal 7, I am attempting to send a list of uploaded files on a newly created node via email.

In a content type, I have a File Field that allows unlimited values.

Within Rules, I created a loop calling the current item "current_file".

enter image description here

I am trying to concatenate all of the values into one longtext field called "file_list".

I intend to use the token for the value of "file_list" in the body of an email.

Unfortunately, I am unable to do so.

While in Data Selection mode, I can access the tokens created by the loop:

enter image description here

However, while in Direct Input mode, the tokens are not available to me. They are not listed in the "Replacement patterns" section.

When I attempt to fill the value with the following, I have no success:

[node:field-file-list] [current-file:file:url] 

What can be done to make the tokens available to me in Direct Input mode?

If I am doing this incorrectly, is there a different way for me to concatenate all of the URLs of each file so that I can put it in the body of an email action?

Thank you.

How to concatenate all token values of a list in a single field within a Rules loop?

I am attempting to send a list of uploaded files on a newly created node via email.

In a content type, I have a File Field that allows unlimited values.

Within Rules, I created a loop calling the current item "current_file".

enter image description here

I am trying to concatenate all of the values into one longtext field called "file_list".

I intend to use the token for the value of "file_list" in the body of an email.

Unfortunately, I am unable to do so.

While in Data Selection mode, I can access the tokens created by the loop:

enter image description here

However, while in Direct Input mode, the tokens are not available to me. They are not listed in the "Replacement patterns" section.

When I attempt to fill the value with the following, I have no success:

[node:field-file-list] [current-file:file:url] 

What can be done to make the tokens available to me in Direct Input mode?

If I am doing this incorrectly, is there a different way for me to concatenate all of the URLs of each file so that I can put it in the body of an email action?

Source Link
AndrewMRiv
  • 333
  • 2
  • 14

Rules - Can only Access Loops Tokens in "Data Selection" mode

Using Drupal 7, I am attempting to send a list of uploaded files on a newly created node via email.

In a content type, I have a File Field that allows unlimited values.

Within Rules, I created a loop calling the current item "current_file".

enter image description here

I am trying to concatenate all of the values into one longtext field called "file_list".

I intend to use the token for the value of "file_list" in the body of an email.

Unfortunately, I am unable to do so.

While in Data Selection mode, I can access the tokens created by the loop:

enter image description here

However, while in Direct Input mode, the tokens are not available to me. They are not listed in the "Replacement patterns" section.

When I attempt to fill the value with the following, I have no success:

[node:field-file-list] [current-file:file:url] 

What can be done to make the tokens available to me in Direct Input mode?

If I am doing this incorrectly, is there a different way for me to concatenate all of the URLs of each file so that I can put it in the body of an email action?

Thank you.