0

I am working on a sharepoint online classic team site, and i added a custom list which contain a field named "Responsibility ID" which is of type "Single line of text", and i set it as hidden inside the New/Edit forms using this PnP script:-

$fieldTitle = "ResponsibilityID"
$customfield = $Context.Site.RootWeb.Fields.GetByInternalNameOrTitle($fieldTitle) 
$customfield.SetShowInEditForm($true)
$customfield.SetShowInDisplayForm($true)
$customfield.UpdateAndPushChanges($true)
$Context.ExecuteQuery()

then i define the below workflow 2013 to get executed when item is added/updated, and i chose to update the "Responsiblity ID" to be equal to RES[ItemID]:- enter image description here

but the problem in my case is that whenever i update the item , the workflow will cause the item to be updated, as follow:- enter image description here

so not sure why the IF statement inside my above workflow is being ignored? so even if the "Responsiblity ID" equals RES[ItemID], the workflow will update the item.

  • 1
    remove the empty condition and then check if the condition works? i believe, responID never empty... – Waqas Sarwar MVP Mar 21 at 21:05
  • @WaqasSarwarMVP Thanks fro the reply.. i already did that but did not work for me.. could the reason be that the custom column "Responsibility ID" is hidden inside the new/edit forms.. but this should not cause the issue... not sure what is going on!! – SharePoint TestDev Mar 21 at 21:26
  • 1
    I am seeing it differently....what is type of current value column? I think one is integer and other is string – Waqas Sarwar MVP Mar 21 at 21:28
  • 3
    @WaqasSarwarMVP the "Responsibility ID" custom column is of type single line of text.. now i find this interesting thing.. i uncheck the "Automatically update the workflow status to the current stage name" inside the Settings section for the workflow inside SP designer, and now my problem is fixed!! seems previously the workflow was modifying the item by updating the workflow status to the current stage name.. – SharePoint TestDev Mar 21 at 21:36
1

I have done a test in SharePoint online, i create a SharePoint 2013 platform workflow like the following and choose "Automatically update the workflow status to the current stage name".

enter image description here

I create an alert on the list which send me alert with all changes.

After i run the workflow, both the version and modified are changed, i receive an email alert which indicates the Stage1 has been changed.

enter image description here

So the problem is that if we choose "Automatically update the workflow status to the current stage name", it will change the Stage1 which results to the items be changed,then the version and modified are changed.

  • thanks for the reply ..so do you think there will be any problem/issue if we uncheck the "Automatically update the workflow status to the current stage name""? – SharePoint TestDev Mar 23 at 0:02
  • 1
    There is no problem to uncheck the "Automatically update the workflow status to the current stage name". – Lisa Chen MSFT Mar 25 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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