Sharepoint HTML Email outputs Junk characters for “Domain\Username” values

若如初见. 提交于 2019-12-12 03:16:27

问题


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.



来源:https://stackoverflow.com/questions/9464271/sharepoint-html-email-outputs-junk-characters-for-domain-username-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!