Sharepoint On-Change Workflow being triggered on item create

Posted on 2012-08-23
Last Modified: 2012-09-02

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.
Question by:delpt
    LVL 29

    Expert Comment

    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

    Author Comment

    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?
    LVL 29

    Assisted Solution

    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

    Accepted Solution

    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.

    Author Closing Comment

    Didn't actually give me a solution, but pointed me in the right direction.
    Giving points anyway for the assistance.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
    As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now