Sharepoint HTML Email outputs Junk characters for "Domain\Username" values - sharepoint

I recently created a workflow on Sharepoint 2010, which has a step to shoot out emails to the desired users.
The content of the email body is formatted in HTML and I need the sharepoint to send me the details of the User who creates/changes a particular item.
However, when i receive the email in my Inbox, I see that it is in Domain\Username format, but I also see some junk characters appended to the same.
For Example. I receive the following output for the sharepoint Lookup [Current Item: Requestors] (As String)
11;#DOMAIN\USERNAME1;#9;#DOMAIN\USERNAME2
Could someone help me in letting me know on how to eliminate these junk characters?

Try "As Display Name" instead of "As String" in the Lookup [Current Item: Requestors].
And btw it is not junk. These the IDs of the users :)
Good luck!

Your issue is that you cannot use "As String" as it includes the items IDs and does not include the users email address, username or login information. You need to the use one of the Semicolon Delimited options in order to use this information.
Now, as for "Coercion Failed: Input cannot be null for this coercion." once you make the change, you can not use a delimited option and then have the field be empty. To get around this set the field as required or leave it as a string with the item IDs being shown.
The same issues arise if you want to use the people picker and then use that field to email those users, you have to use "Email Addresses, Semicolon Delimited" and the field must have a user selected or it will run in to the coercion error.

Related

Is it possible to pull HTML code into a Sharepoint workflow email?

I've been asked to set up an email communications for our department, where we can click to send fully formatted html emails based on list entries out to other teams. I'm having issues getting this to work properly, but as an interim solution, I'm wondering whether I can add a new field where users can paste the html text into and have a workflow pull from this field and output into the body of an email without showing it as plain text.
Currently, I've tried with a blank body apart from the one call to a rich text field I've called 'CommsHTML', however this outputs into the email as plain text, with all the coding elements showing. I've tried copying the HTML directly into the workflow email's 'body' and that works without issue.
Yes, it's possible. Per my test, we could pull HTML code into a sharepoint workflow email.
Below is my test:
1.Add a field "Html code"
2.In the workflow email, add this field.
3.The email I get like this:

Send e-mail using Assigned To

I have SharePoint 2007 and SharePoint Designer 2007. I have a workflow that sends out an e-mail to admins when certain conditions are met. What I am struggling with is getting the Assigned To data in the TO part of the e-mail. I can do a lookup to get the Assigned To value in the body of the e-mail, but not in the actual To field (as Assigned To just isn't one of the options to select in this field, and any attempt to add this just doesn't translate at all into any sort of readable e-mail address).
So, my question is, how do I, using a workflow generated e-mail, send e-mail notifications utilizing the Assigned To field.
Thanks in advance.
I believe you'll need to have an action (preceding the "send email" action in the workflow) in which you set a variable equal to the value of the "Assigned To" field, retrieving the field value as an email address. Then use that variable as the recipient in your send email action.

How can I create a connection/link between Excel and an Outlook email?

I've been sending Outlook emails from Excel for a while, using it to manage my sales and project management activities at work. I've been enjoying increased productivity from it, so I want to do some more advanced things. For example, I think I have the code worked out, probably in a crude way, to have Excel help keep track of emails that have not been replied to. (I simply have Outlook, for each new email, open a workbook, and create a record in a new row, then have Excel attempt to match it to an email I previously sent.)
But once I have a record in Excel of such an email, it has no link or connection to the actual email. I want to be able to click on the Excel icon or link for the email, and then pull up the actual email.
I have found possibilities in using EntryIDs and MessageIDs, Outlook URLs and GUIDs,and even good-old AdvancedSearch (but I think having Excel search for an email that it initiated seems pretty clunky; there should be a way to create a hard link to the email).
Relatedly, and also probably just as clunky, but I've pondered "embedding" a unique identifier in each Excel-initiated email, that could be used to find it and link it back to a record in Excel. In an HTML email, I can add a string of numbers under my signature, in white text on a white background, and it's not perfect but in most cases should go unnoticed, and would allow my spreadsheet to positively identify it (as a reply to a particular email, etc.)
I know we're not supposed to ask for "advice" but I am hoping someone can point me in the right direction to something that may work for what I hope to accomplish.
Why not use the email's time sent (TIMESTAMP - MMDDYYYYHHSS), Recipient, and Subject Line as unique, identifying markers? Add these fields to your row data. Then, after email is sent, create a macro event that will:
Launch the Outlook App
Open the Sent Folder
Loop through all items
Filter email to the markers (Time, Recipient, Subject Line) of the active Excel row
Open the Email Item
Aside, my personal advice is to use a database like MS Access which works great with its siblings, Excel and Outlook. Also, it is designed to maintain relationships between data elements. Access could hold all the needed email content (emailID, recipient, subject, body, date, emailsent?) and with forms can provide AfterUpdate, ButtonClick, OnOpen events to manage the process of data entry, email process, data update, so on. If only you knew the increased productivity that comes with a relational database!
You can add a user property to the MailItem class. See the UserProperties collection for more information.
The automated systems add an ID to the end if the Subject line.

Declarative SharePoint 2013 Workflow Sending Email to Person Specific in Item List Field of Type Person/Group

I've been looking everywhere... for days. (I'm stubborn so I don't like asking questions before trying.) So here is the hardest question ever:
I have a SharePoint Online (2013) Custom List on which I'm running a Workflow. The association shows so the Workflow actually runs, and I receive email from it to one of the hard-wired emails.
The problem is getting an email dynamically, from a Person/Group field in the list. I have a field named ResponsiblePerson. When I try to get the value of that field (all I care about this "Person/Group" is the email), it seems to come as a null or empty string value.
I've tried many different variations to the following:
First I get the item.
Then I get values from the item. I just get ResponsiblePerson and put it in a variable called rp1. I tried to make this variable of type dynamic and string. Both didn't work, as I get an empty value in the email (see next step).
Finally, I send an email.
This email is addresses to a static email for testing. I get an empty rp1 otherwise I would have specified it in the To of the email activity (within a collection) and we would be done.
Use the field name + "Id".
Here is where I blog about this: http://mazdev.blogspot.ae/2014/05/get-value-of-persongroup-list-item.html

Sharepoint HTML Email outputs 5;#, 4;#, etc characters

I have a problem with SharePoint 2010 email sending. I have a list with a column (single line of text), for example the value is 'Apple'.
I have a workflow, what starts when the new item is saved and the email going out includes the [%Current Item:Apple%] lookup. The problem is, when the email arrives it shows '5;#Apple'.
I found this QA - Sharepoint HTML Email outputs Junk characters for "Domain\Username" values - but with the single line of text you cannot modify the "Return field as" since it's just a string.
How can you remove this extra character, the ID of the item?
Thanks.
added as it's possibly important: the source list is a standard list, but in the new item form you use it with a Resources Field, a resource list: http://office.microsoft.com/en-us/sharepoint-server-help/enable-reservation-of-resources-in-a-calendar-HA101810595.aspx
I ran across this post when researching a similar problem. Here's how I finally got it to work:
Create a new workflow variable with data type string.
Set the value of the variable to Current Item:Apple (the name of your Resources field).
Use the new variable in your email, and when doing so you will have many more options to return the field as (I used "Lookup Values, Comma Delimited", which just lists the names of the resources).

Resources