G'Day,
This looks like a great module and obviously many people have been using it with good results. This is our first attempt and I'm not having much success.
We are starting with a clone of the standard admin view for users: this view allows me to filter for the users I want to send an email to.
I want the users to review the values on some nodes that they have created (ie, they are the drupal authors of those nodes).
So I add an Author relationship to my user admin view and then call in a bunch of fields off of the node type I'm interested in.
In the Views preview this all looks fine, exactly as we expect. The fields that are pulled into the view display in the preview table. So I know my View is correctly connected to the values on those related nodes.
The Send Email option is placed as the last field in the Views Fields stack, so it should have all the preceding field-tokens available to it.
However, the rendered email shows that only the views-send tokens are expanded...none of the others are.
Cache has been flushed multiple times, views have been edited/saved, various nodes have been tested. Cannot get regular field tokens to expand.
Here's a sample:

(mail template)

Title: [views-send:title]
Primary contact: [node:field-contact-name]

<strong>Phone: [node:field_contact_phone]

(email--rendered results)

Title: Nodal Title Expanded Properly [2]
Primary contact: [node:field-contact-name]
Phone: [node:field_dir_contact_phone] 

There are values in the contact and phone fields.
When both options are available, I'm not sure whether to use the field_underscore_version or the field-hyphen-version, but I have tried both in this testing and neither expand as expected.

Is this sufficient information for someone to offer advice or clues?

Thanks very much for any assistance!

Comments

hansfn’s picture

Status: Active » Postponed (maintainer needs more info)

[node:field-contact-name] probably doesn't work because the base table of the view is the user table. Isn't contact name also available as a Views Send token ([views-send:*contact-name*])? If that isn't the case and you still have problems, please export your view and attach it to this issue.

PS! It's always recommended to tell which Drupal and Views version you are using.

boabjohn’s picture

Hey there hansfn, great module and thanks for the quick reply. Yep, I'm on latest D7 and Views 7.37.
You say:

doesn't work because the base table of the view is the user table

Precisely that is the situation. However, I did not expect that this would be a limitation since of course the whole point of integrating with Views it the ability to draw fields from wherever we like as long as a valid Views relationship can be constructed.
In this case, for admin convenience, I do want to think of this as a *user management* view, so the base table is users. But the key point I need to email each user about concerns data they have entered on a normal entity bundle. The fields are plainly accessible to Views using a single relationship.
If I were to set Send Email up as an option column on the node base table, I would need to make a relationship back to the user in order to get their details.
So either way I have to pull field values into the current View via a relationship.
Views handles this fine. Views provides rewrite Tokens that expand just fine. The missing step is Send Email, which I'm still not clear about, based on your comments.
Are you suggesting that Send Email can never expand tokens for fields that are incorporated into the view via a relationship?
Can you advise me on this specific point?
Thanks very much,
JB

hansfn’s picture

doesn't work because the base table of the view is the user table

Precisely that is the situation. However, I did not expect that this would be a limitation since of course the whole point of integrating with Views it the ability to draw fields from wherever we like as long as a valid Views relationship can be constructed.

You misunderstood the doesn't work comment. I tried to say that [node:field-contact-name] doesn't work, but there should be similar Views Send token that should work. I use tokens for fields from relationships all the time.

Please attach your view (preferably as minimal as possible) so I can quickly test if it works for me or not.

boabjohn’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

@hansfn Yes, of course you are right: all I needed to do was use the views-send:* versions of the tokens.
Because the other tokens were presented, I simply used them out of default habit.

Should anyone else bump into this thread, the simple answer is:

[views-send:field_name_sample] << Expands just fine
[node:field_name_sample] << Does Not expand

Cheers!