Bulk importing files

From TempusServa wiki
Jump to navigation Jump to search

What

This page describes how to setup the bulk-import codeunit, to import a lot of files at once and generate a separate record in an entity, for each file.

How

First, setup an entity with at least two fields: A text-field for the filename and a document field for the document.
Second, create or edit the following 5 "Static content".

  1. BulkImport.SagID, the SagID of the entity that is the target of the import
  2. BulkImport.UserGroupID, The GroupID of the usergroup that is allowed to access the bulk-import system
  3. BulkImport.FileTitleField, The systemname of the field where the name of the file should be stored
  4. BulkImport.FileFieldID, The FieldID of the field where the uploaded document should be stored
  5. BulkImport.StatusID, The StatusID that uploaded documents should have

Third, edit the url on the site and access main?command=dk.tempusserva.codeunit.bulkimport.ImportPage
Fourth, upload the files.

Next step could be to index all the files, allowing the content of the files to be searched and queried, maybe through ChatGPT.