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

Delete PDF from library

Jump to solution

I have a library where there is a workflow that goes through an approval process. When the item is finally approved the document is converted into a pdf.

The word document that lives in the first library will move to a archived status and this is manually changed by the user. They edit the item and then change the status of that item to archived.

What I want to do is when the item is placed in archived the pdf gets deleted in the other library.

I have a workflow that only runs on modification when the item is placed in Archived status. Once it starts this is the action that I configured however it is not deleting the pdf.

Labels: (2)
Tags (1)
0 Kudos
Reply
6 Replies
Nintex Employee
Nintex Employee

Re: Delete PDF from library

Jump to solution

Hi Rency,

I recreated the issue you were having.  I also had issues (and errors) when trying to delete the PDF file in the second library using the Name field.  I set workflow variables to equal the Name field in both lists and logged those variables to the history list.  The values came back as "Filename.docx" and "Filename.pdf".  Since the Name fields are different that could be your issue.

You could use a Regular Expression to strip out the file extensions, save those results in workflow variables, and update the Title fields in both lists with those variables.  Then you could use the Title fields in your query for the Delete Item action.  That worked fine for me and deleted the PDF file in the second library when the status of the Word document in the first library was set to Archived.

Give that shot and see if that works for you.

View solution in original post

Reply
mapeacock
Nintex Newbie

Re: Delete PDF from library

Jump to solution

Hi Rency,

Just double-check the name field - are you sure this is the field to use? It contains the file extension too, so unless the "NameOfWI" is the same name plus extension, I believe it won't delete the file. Unless I'm misunderstanding your process?

Cheers,

Mark

Reply
thomas_xu
Nintex Newbie

Re: Delete PDF from library

Jump to solution

Hi Rency.

I would use Log in history to check what value "NameOfWI" contains so you know what you are deleting is what you intended to delete.

If delete the pdf file by name does not work as stably as others have mentioned above, consider deleting the pdf file by id. (Use query list to get the id of the target pdf and then delete it by id)

Hope that helps

Thomas

Reply
rencygonzalez
Nintex Newbie

Re: Delete PDF from library

Jump to solution

Thank you sooooo much it works now. I didn't realize that the extension was what was throwing off my workflow.

Reply
rencygonzalez
Nintex Newbie

Re: Delete PDF from library

Jump to solution

Thank you Mark!

Reply
rencygonzalez
Nintex Newbie

Re: Delete PDF from library

Jump to solution

Thank you Thomas!

0 Kudos
Reply