1

In SharePoint 2013 List A, I want to refresh value of column A of all items, but I don't want to make new item version when I do refreshing/update.
Column A is calculated column and it is calculating difference in time between Now() and some other date column. So it would display correct value only if user manually edit item.

I found PowerShell script that updates column A, but it will leave new item version, any chance to suggest me how can I modify it so Items won't be updated?

$web = Get-SPWeb http://Server/ListLocation
$list = $web.Lists["ListA"]

foreach ($item in $list.Items)
{
  $item.Update();
}
3
  • SPOnline added a SystemUpdate.. Are you the Formulas only for display? Or does its value trigger other Formulas or Workflows? Commented Apr 10, 2017 at 9:24
  • That column A will later be used for additional calculations. Commented Apr 10, 2017 at 9:27
  • Then all Front-End only solutions do not apply Commented Apr 10, 2017 at 10:16

1 Answer 1

2

Try below code:

$web = Get-SPWeb http://Server/ListLocation
$list = $web.Lists["ListA"]

foreach ($item in $list.Items)
{
  $item.UpdateOverwriteVersion();
}

Reference - UpdateOverwriteVersion

You can also use:

item.SystemUpdate();

difference -

UpdateOverwriteVersion() - updates the list item without creating a new version, but the Modified and Modified By fields are also updated.

SystemUpdate() - updates the list item without creating a new version,also the fields Modified and Modified By are not updated.

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.