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).
Related
I am working on a small COVID screening app. I have 2 lists in a single Sharepoint site:
BasicInfo:
ID (autogenerated by Sharepoint)
Name
Company
PersonalInfo:
BasicInfoID (a Lookup field to BasicInfo.ID)
Personal Phone
Personal Address
Company Phone
Company Address
All fields in both lists are required.
Creating the Powerapp, the BasicInfo form works as expected - records are populated in the Sharepoint list, and I can access the ID generated with BasicInfo.LastSubmit.ID after submission.
On the second screen of the app, I am having a hard time getting the "BasicInfoID" field populated. I am expecting to be able to set the value of BasicInfoID on the 2nd screen, then hide it, so the end user doesn't need to see (or populate) the value.
I have tried:
Setting the default value to BasicInfo.LastSubmit.ID, but I get an error of "Expected Record Value. The property on this control expects Record values. The rule produces Number values which are incompatible."
If I set the default value to BasicInfo.LastSubmit (no .ID), the form oddly submit - but the resulting data in the Sharepoint list doesn't show any value in the "BasicInfoID" field - it lists it as Required Info.
If I remove the automatically generated BasicInfoID field, I obviously get an error of "BasicInfoID: Field "BasicInfoID" is required."
I have added a Text field, assigned the DataField value to "BasicInfoID", set the default value to BasicInfo.LastSubmit.ID, but the form fails with the same error (BasicInfoID: Field "BasicInfoID" is required).
Thanks in advance!
When you do a LookUp from one SPO list (1) to another (2), the schema of the field in the list 1 is the same as the one returned by the Choices function. So in your scenario you can use this expression:
BasicInfoID: LookUp(Choices(BasicInfo, Id = BasicInfo.LastSubmit.ID))
The post at https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/ has some more detailed information about using complex columns in SharePoint (such as LookUp ones).
Hope this helps.
We are trying to get around the limitation of Field Permissions in SharePoint by creating a second list which will allow users to edit what they are allowed, instead of the whole form. In this case, it is on field that is set to Person or Group (Dashboard). For reference, the Person or Group gets info from AD, I am not sure if that is standard or not info but thought to add it in.
We have created a second list that has two fields, one being a Person or Group (AddToDashC) and the second being plain text (CopyName), where a workflow triggers and sends the Person or Group to plain text as Display Name, as that is what shows in the Person or Group. Last Name, First Name. This workflow works fine.
On the main list, we have separate list items where the Dashboard field can be edited, being unique for each list item. I can’t figure out the logic to be able to match the IDs up so that we can transfer the CopyName information to populate the correct list item ID through a workflow. We have a Lookup on the first list (AddtoDashWFC) which grabs the plain text form, CopyName, but just trying to figure out how to populate it properly.
I was hoping to have an edit link next to each list item in the column, which will go to the second list but still link to the report through the ID.
Sorry for the seemingly basic question, I just can't get the logic.
List 2 Workflow so far
List 1 Workflow so far
Thanks,
Patrick
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
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.
I have a Document Library A and a list B.
When a document added to A, an item is created in B with the Title = A.Url. Another workflow runs whenever a document is updated in A which makes a lookup: B.Title = A.Url, and changes another column in B in found item.
Item Change Workflow always gives "Error Occurred: List item is not found". I modified the workflow to send me an e-mail containing the new (but unchanged) A.Url. It sent me the exact string with the one already in list B.
Anyways, why it can't find the item when the two columns are equal?
Thanks in advance.
Edit:
I literally hate Microsoft Sharepoint.
This is going to seem very unintuitive, but try "Building a Dynamic String" into a String variable, containing only [URL] from list A (or whatever the field name is). Then use this variable to perform your lookup against list B.
This voodoo magic has often worked for me when I encounter string comparison mysteries in SPD workflows.