Dec 05 2016 06:16 PM
Dec 05 2016 06:16 PM
Hi all , just running this powershell command, but the TItle is not being populated when I add the "PM" column value. The PM is a User/Group Column. If i remove that it works, but as soon as I add it back in the title is not populated?
Also another observation if I use
Add-PnPListItem -List "ProjectListing" -Values @{"Title"="My Title";"ExternalSharing" = "No";"Single" = "Yes";"PM" = 'me@domain.com'}
ANy thoughts would be greatly appreciated....
Dec 05 2016 10:22 PM
Dec 05 2016 10:22 PM
Hi Daniel,
i think you inserted the user the wrong way it should be: "i:0#.f|membership|anotheruser@yourtenant.onmicrosoft.com";
Dec 05 2016 10:43 PM
Dec 05 2016 10:43 PM
Dec 06 2016 07:45 AM
I've found weird things too with this command when trying to add 'people/group' fields.
But the fix was to run it twice. First run, create the item and add the person, next run, add the remaining fields.
$i = Add-PnPListItem -List $l.Title -Values @{"Approved_x0020_By"="cdebbo@abc.def"}
Set-PnPListItem -list $l.Title -Identity $i.Id -values @{"Model"="Airplane 737"; "Barcode"="737-767-dd78787"}
it works. Makes a bit of a mess if you have flow/workflows triggered on new/updated items but you can add conditions in the workflows to trigger on certain field values.
BTW- I would really love to see a Set-PnPListItemPermission command ... so I can modify permissions for individual items.
Dec 06 2016 11:19 AM
Dec 06 2016 11:22 AM
I've only used this in one place so far and what I did was set a field (e.g "done" = "true") when all my fields are finally set. Then I trigger my workflow to run on update and to check if 'done = true'.
I suspect you've already solved this much. I don't have an answer for a new item workflow.