Hi all,
I have a scenario where users can select a contact person from a gallery (items from a SharePoint list called Activities). The Activities list contains a person field (ContactName), so when the user selects a contact, I populate a global variable called gblSelectedRecentContact with the information from the ContactName field (claims, displayname, and email) .
Set(gblSelectedRecentContact,ThisItem.ContactName)
I then use gblSelectedRecentContact in a patch statement (on a different screen) to write the selected contact to a person field in a different SharePoint list:
Requester:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: gblSelectedRecentContact.Claims,
Department: "",
DisplayName: gblSelectedRecentContact.DisplayName,
Email: gblSelectedRecentContact.Email,
JobTitle: "",
Picture: ""
}
This all works just fine when I have the app in edit mode, but it fails when I run the published app because, for some reason, the user specific portion of the claims string is being stripped out. As a result, I get the following error:
The requested operation is invalid. Server Response: Activities failed: The specified user i:0#.f|membership| could not be found.
I have gone so far as to create separate variables to house the claims, displayname, and email (rather than storing them as a record in the single gblSelectedRecentContact variable), but that didn't solve the problem either. I also tossed some labels on the screen with the submit button (where the patch statement is) to show the variable contents to make sure I wasn't somehow losing the contents between screens (the labels show the correct claims, etc.)
So – my question – why does this work flawlessly when the app is in edit mode (everything patches correctly), but fails when it is run normally?
Thanks for any help,
Joel
------------------------------
Joel Roetzer
Managing Principal
Hudson
------------------------------