Question

How can we pull copies of documents via PLSQL and place them a specific place

  • 17 October 2022
  • 3 replies
  • 123 views

Userlevel 2
Badge +7

Hi

At various points, we need to get 100+ documents out of IFS, and leave at a specific path for others to then take. Is it possible to get these documents out via PLSQL. By searching the community i have found others who got documents out by mail, but with 100+ documents at a time this does not seem like a feasible solution.

We have discussed having a Custom menu with a PLSQL method underneath. Could this work?
And is it possible to place the files on the users machine, or only one central spot

Best Regards


3 replies

Userlevel 6
Badge +14

Hi @NicklasMadsen 

You can do this with a custom PLSQL code. But I believe the easiest method with no involvement of coding would be to set up a new repository type of shared folder and then by using “Change document repository” option, move the files that are in the database to the newly defined shared folder. By using this way IFS will copy the files in the DB to your preferred folder automatically.

 

Thanks

Userlevel 2
Badge +7

Hi

How can we get the documents via PLSQL?
Those who will be initiating the pulling of documents, will not have IT competencies, and will not have a way to find the documents. The users will only have either an account number and a voucher type. We would like to create a PLSQL method, called either as a DB task, or Custom Menu that given those information pull out the documents.

As a note, some documents will be in FTP and some in Database

Best Regards

Userlevel 7
Badge +30

Hi,

There is no official way to do this from PL/SQL. People have however managed to pull off this stunt 🙂 using the Batch_Transfer_Handler_API. Since we don't recommend using this API (it's meant for internal purposes in IFS standard functions) we will not provide any code examples. But if you search here on IFS Community I think you will find examples that you could use to put something together yourself.

Another approach is to use the Copy File To... command from the Document Revision screen. Did you try that? You would need to come up with a query that lists all documents you are interested in there, but perhaps that's simpler than to get the PL/SQL approach working. In case you didn't try it, you can navigate with all attached documents from any screen, from Attachments / Documents. Just select the documents you are interested in there, then do RMB and select Document Revisions.

 

Good luck!
 

Reply