cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bcasey
Nintex Newbie

Update Item Properties in Document Library Fails

Jump to solution

I am using WF to take a list item from a custom list and create a Word document (using content controls).  Then, I convert the Word doc to a PDF and save it to a Document Library, along with any attachments to the list item.  Also, I then update some fields for the newly added docs in the library.

All this is working great except that I get errors when the WF tries to update the PDF document properties.  The attachments are generated, renamed, and added to doc library fine, and all their properties are updated via Update Item with no issues.

Then, I go to update the properties of the PDF form that was added, and I get an error and fields remain blank.  You can see ItemID below is filled in for attachments, but not for the PDFs / forms.

In my failing Update Item action, I have set URL Path to the same variable that is used when creating the PDF in the doc library.  In my log, I can see and verify that this URL is correct, and if I paste it into a new browser window, it even opens the document.  I've also tried setting URL path to the value of the URL directly, still no update.

It's strange that this works fine for the attachments that are added to library, but errors on the PDF that was added.  Some attachments are PDFs as well, and still work fine.

Reply
2 Replies
amolvaidya
Nintex Newbie

Re: Update Item Properties in Document Library Fails

Jump to solution

Are you using the Nintex document converter action to get the PDF files ?

Typically this will NOT be executed immediately. A batch executes at a time interval looking for any pending conversions. 

So effectively when you are trying to set the item permissions the file does not exist yet and hence the errors.

Can you verify this ?

0 Kudos
Reply
bcasey
Nintex Newbie

Re: Update Item Properties in Document Library Fails

Jump to solution

I figured out why this wasn't working for me.

I was using a Regular Expression action to generate the final URL path of my Word doc and the final PDF.  I pasted in the URL from the 2 doc libraries where I wanted these documents to land.  I saved these URLs to a WF variable.  These variables then became the document names for my Word and PDF documents after they were generated, and I used them to select the URL path of the PDF in the Update Item action that was failing.

I noticed a small difference between my Word URL and my PDF URL.  One had changed the spaces in the doc library name to "%20" and the other had not.  The one that kept the spaces was able to update the item, the one that changed the space to "%20" caused an error.  I manually changed every instance of "%20" to a space in my regular expressions, and it works now.

Example: 

Not Working -  https://www.sitename.com/Document%20Library%20TempDocs/Filename.pdf

Working -  https://www.sitename.com/Document Library TempDocs/Filename.pdf

0 Kudos
Reply