I'm trying to write a rule that will send an email to users of a role. Within the body of the email, I'd like to display the contents of a nested field collection. I've tried using what rules gives me for data selectors, but, I can't seem to put it together. Specifically, I have two field collections: field-boat-lineup and field-equip-rowers. 'field-equip-rowers' is actually nested within 'field-boat-lineup'. The contents of 'field-boat-lineup' are consistent. That is, their fields are fixed values except for 'field-equip-rowers'. 'field-equip-rowers' is variable and can consist of up to 8 user names.

Can someone point me in the direction of how to display the contents of the field collections in the body of an email? Do I need to write some PHP code to make this happen? If so, what's the critical piece I'm missing?

On a side note, I find the field collection syntax used when working with the rules data selector somewhat confusing. Specifically, the use of what appears to be an index. For example,

[node:field-boat-lineup:0:field-equip-boat-name:title]

I see the usage of a '0','1', '2', and '3' in the above token. I'm never quite sure what to select: 0, 1, 2, or, 3. Can anyone shed some light on the purpose of the numbers?

Any help would be greatly appreciated.

Comments

rrirower created an issue.

Michelle’s picture

Looks like this was caught in the spam trap. Publishing.