0

I got a multi line column('Comment') which is set up to add changes/new entries. When an entry is added, the date and user appears on the left side. I am able to add entry using Set-PnPListItem, but my name and current date appears.

I need to set different user and date within that 'Comment' column (not the author/editor of the whole item). Is it possible to accomplish that using pnp or any other way?

Set-PnPListItem -List "My list" -Identity $itemID -Values @{"Comment" = "Test Comment"}

Example:

enter image description here

Thanks

1 Answer 1

0

You can use -SystemUpdate. Here is example with Author.

Set-PnPListItem -List "My list" -Identity $ItemID -Values @{"Author" = "[email protected]"} -SystemUpdate
Set-PnPListItem -List "My list" -Identity $ItemID -Values @{"Editor" = "[email protected]"} -SystemUpdate
2
  • thanks for the quick response. I believe your example will change the Author for the whole item. But I need to change Author and Date withing the multi line column ('Comment') itself, for each comment that i am adding.
    – user81183
    Jan 29, 2019 at 14:14
  • this comment existed with versioning? Or its custom multiline ? look to the link at MS documentation to -Values, this is probably user who made the changes, so you probably need somehow work "as different user" and add this comment Jan 29, 2019 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.