Unable to Update Content Controls

  • 17 June 2016
  • 5 replies
  • 55 views

Userlevel 3
Badge +9

I have a document library where I have added a Content Control to the template for a content type in order to update the version number on the document using the "Update Document" action. I got the idea from reading Write to Documents using the Update document action However, for some reason, I can't get the content control to update.  The workflow I have runs fine with no errors, it just doesn't update the content control.

I verified that the name of the Content Control in the document and what I'm using in the workflow matched.

Anyone have any ideas on what might be causing the issue?  Since this is a custom content type, do I need to update the template at the site level or the list level? Initially I was using a regular document as the template instead of an actual template document, so I thought that might be the issue.  But after I changed it I was still having the issue.


5 replies

Badge +6

Brendan,

I use docx documents all the time for my templated documents, so I dont believe that is the issue. I also have many Custom Content Types defined for various document templates, so it is definitely achievable.

Are you using Rich text or Plain Text content controls? I would suggest only using the Plain.

These controls are case sensitive in the workflow action, so make sure that you have the exact case correct in the action to what is in the document content control. Also make sure that you do not have the contents locked in th properties of the control. I always replicate the title and tag fields in the document control, so they are the same value.

Another thing to check is whether you have sufficient time between actions if you are creating a document and updating it. I tend to put a commit pending actions control in the workflow after creating a document and if subsequently updating the same document another after the update. I would think that it would error though if you were encountering this issue.

Cheers,

Mark

Userlevel 3
Badge +9

Mark,

Thanks for the reply.  I'm using Plain Text content controls. The title and tag of the content control are the same, and I have verified I have the same name in the workflow.  I do not have the "Contents cannot be edited" field checked on the controls. 

After doing some further testing I have found that if I take just a plain blank document and drop the content controls on it and save it as a template for the content type that it works.  However when I use this other more complex template that I was given, it doesn't work.  Is it possible there is something with he document itself that could be preventing the fields from updating?  Maybe it's corrupted?

Userlevel 3
Badge +9

One more question.  Does it matter if you load the template with the content control for a content type at the list level, or at the site level?

Badge +6

Hi Brendan,

Is the orginal document you are trying a docx or a dotx? If it is the later you will need to change the extension to be a docx.

On your other question, once you have the content type defined, you can update the document at the list level without issue.

Cheers,

Mark

Badge +8

Hi 

I had a similar problem and it would not work as the form was corrupted. I copied the form to a new word document and it now works.

Reply