Form Validation and Workflow Updates


Badge +2

I have built a form that also has a SharePoint form Validation formula.  This validation formula works fine when I:

  1. Create a new form
  2. Update a new form
  3. Run a list workflow (Nintex) with update field

all have no issues.  The problem comes up when I created a site workflow and try to update a field.  This will give me

The workflow could not update the item, possibly because one or more columns for the item require a different type of information

Here is my validation formula

=IF(AND(CM="Yes",[CM Status]="No CM"),FALSE,IF(AND([Date Completed]<>"",[Work Start Date]=""),FALSE,TRUE))

The validation just checks two parameters: 

  1. If the field CM is set to yes and makes sure that the CM Status is not set to "No CM"
  2. If the Date completed is filled in, then make sure the Work Start Date is also filled in

The Site Workflow is trying to updates something that is not even related to the formula, which is to update the item Due Date.

If I take the validation away, the workflow runs without any issues, put that validation formula back, it throws the message.  It's also worth mentioning that with the validation formula in place, regardless of what field I try to update, it throws the same error message.

What am I missing? 

Also worth mentioning is that I don't have access to Nintex forms nor am I allowed access to write javascript to do the validations(I wish I could)

Thanks in advance for the help. 


6 replies

Userlevel 5
Badge +14

can you post screenshot  of update item action?

Badge +2

Update Image

Hi Marian, please see the screenshot of the update.  Like I said, no matter what field I update, it's all the same.  It works great when the validation is taken out, but as soon as I put it back in, it throws the error.

Userlevel 5
Badge +14

ok.

have you made sure variable contain correct values with correct datatypes?

have you made sure that value of vQueryNumber identifies just one item in TrackingLog list?

Badge +2

Hi Marian, sorry for the late reply,

to answer your question, yes to all.  The tracking log's QueryNumber is set to unique value on the sharepoint list.  The data types have been set correctly as far as I know.

I'm stumped. 

Userlevel 5
Badge +14

apparently your validation evaluates to false and causes error.

if you are sure workflow correctly identifies item(s) to update, and makes update correctly, you should examine item(s) being updated.

if you're not able to identify which field causes validation to fail, I would suggest to apply validation step by step from simplest expression up to complex ones.

eg. first just: CM="Yes"

then: [CM Status]="No CM"

then: AND(CM="Yes",[CM Status]="No CM")

etc.

Badge +2

Thank you, Marian, I'll try step by step with the workflow and see which one fails. 

Reply