• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 674
  • Last Modified:

Sharepoint On-Change Workflow being triggered on item create


Sharepoint List:  Complex with over 100 fields, many of which are calculated Currency values

2 Workflows:

1) On Create -  Sets a few fields to be equal to other field values (Field1=Field2, Field3=Field4, etc.) and then executes On-Create approval logic

2) On Change - Begins some calculations and executes On-Change approval logic

The List in question has a custom Infopath Form.  Nothing fancy, however.  Just the fields arranged in a more aesthetically pleasing manner and some display formatting of calculated fields.

The Problem:

When I create a record, both the On-Create and On-Change approvals occur, where it should be ONLY the On-Create.

What I have done so far:

Looked at the details of the InfoPath form for any anomalies or data changes.
Attempted to cease the On-Change workflow using IF-THEN logic.
Panic.  :)

Any assistance or suggestions would be most welcome.
I cannot figure out what is triggering the "On Change" logic when a record is created.
  • 3
  • 2
2 Solutions
You say on create that a few calculated fields are worked out. Would this not constitute a change to existing?
One way to test this theory is to turn on versioning, create an item then look at its version history. If the calculations are creating a changed version then you may need to build in some more logic
delptAuthor Commented:
You're correct.  It is creating a version when the On-Create workflow changes the fields.  

I am using secondary fields to determine if primary fields have changed on save (calculate Field1-Field2, if answer not zero then perform approvals).  To do this, I am having a workflow run on create that sets Field2=Field1 so the changed-field logic can work.

Any idea how I can set these values on create without causing a version to occur?
Not really as the values will be written once the other data is committed. You may have to stick with your plan b and check values before running your on change workflows
delptAuthor Commented:
The way I worked around this was to use logic in the On-Change workflow.
Since the On-Change workflow was being kicked off by the On-Create workflow's setting default values, I just changed the On-Change workflow to run both On-Change and On-Create and embedded the first workflow into the second with subtraction (to check for field changes) and Major/Minor approvals processes.
delptAuthor Commented:
Didn't actually give me a solution, but pointed me in the right direction.
Giving points anyway for the assistance.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now