You are viewing limited content. For full access, please sign in.

Question

Question

Clean up External SQL Table

asked on October 3, 2017

We have an external SQL table that creates a record every time a new folder is created (using the Insert Data function). 

Over time, we have deleted a lot of those folders, but the corresponding record still exists in the table. Can you please outline the steps to create a on-demand workflow we can create to clean up the table of those orphan records.

Any help would be appreciated...

Thanks,

0 0

Replies

replied on October 3, 2017

Hi Issac,

You will need to query your sql table, determine if that folder exists and if it does not delete the entry via  a custom query.   I am not sure what your table data looks like but you just need to ensure that the search entry is accurate to determine if the folder exists or not.

We have a few similar tables that are updated each time a folder is created.  One thing I do is add a table entry that contains the Entry ID for each folder.    Every document/folder in the repository has a unique Entry ID and this makes searching the repository very simple ( using the Find activity ) even if the folder has been moved to different folder path.

Hope that helps!

0 0
replied on October 3, 2017

This would work, but it's somewhat inefficient. Find Entry with the folder's ID would be faster instead of Search repository.

The even more efficient way would be to have a Workflow that starts on "entry deleted" events and runs a Custom Query to delete the row by entry ID from the external table.

0 0
replied on October 3, 2017 Show version history

For cleanup of an existing table I think the inefficient method would be the only route using a find is the better option but not sure what the database contains.   Do you have full paths to your folders?  Is it possible the folders have been moved?

For on going maintenance a conditional workflow on 'entry deleted' is spot on.

 

 

0 0
replied on October 3, 2017

Thank you very much for the quick response. We contacted our Laserfiche consultants and they walked us through the process, (essentially as outlined above).

One time, will take the time to learn the basics of Workflow customizations!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.