Sharepoint HTML Email outputs Junk characters for

2019-09-03 03:12发布

问题:

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?

回答1:

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!



回答2:

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.