?
Solved

Sharepoint On-Change Workflow being triggered on item create

Posted on 2012-08-23
5
Medium Priority
?
668 Views
Last Modified: 2012-09-02
Scenario:

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.
0
Comment
Question by:delpt
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 38327608
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
0
 

Author Comment

by:delpt
ID: 38329775
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?
0
 
LVL 29

Assisted Solution

by:QPR
QPR earned 750 total points
ID: 38331068
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
0
 

Accepted Solution

by:
delpt earned 0 total points
ID: 38342276
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.
0
 

Author Closing Comment

by:delpt
ID: 38358440
Didn't actually give me a solution, but pointed me in the right direction.
Giving points anyway for the assistance.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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