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

Question

Question

Import agent xml with multiple attachments (pdfs, etal)

asked on December 22, 2020 Show version history

I am creating an Import Agent Session that will look for an XML and import the related attachments. Currently, the import works successfully when the XML cites one pdf.

I have two questions:

  1. What are the other file extensions that import agent can recognize in the XML (pdf, jpeg, jpg, doc, docx...??)
  2. Can the XML Reference more than one attachment?
0 0

Replies

replied on December 22, 2020

There are no recognized/banned extensions. Laserfiche entries can only have one electronic document component, so it's likely you are not creating multiple documents.

If you post a sample of your import XML list, we may be able to give you better suggestions.

1 0
replied on December 22, 2020

My XML is being generated from an online order portal where there may be more than one attachment.

When there is one attachment, it works fine. I am looking to discover how do I handle the XML/ process if more than one attachment is involved. 

XML TEST.docx (13.26 KB)
0 0
replied on December 22, 2020 Show version history

Chris,

As Miruna mentioned you can't have multiple electronic files attached to a single document, so when importing multiple files via XML you need to have separate LF:document elements, each with their own file reference.

The following is an example of the XML format I use for this purpose:

<?xml version="1.0" encoding="utf-8"?>
<LF:importengine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://laserfiche.com/namespaces/importengine ImportEngine.xsd" xmlns:LF="http://laserfiche.com/namespaces/importengine" version="1.0">
   <LF:toc on_document_conflict="unique" on_folder_conflict="merge">
        <LF:document name="DOC 1" template="TEMPLATE">
            <LF:metadata>
                <LF:field_values>
                    <LF:field_value name="FIELD">VALUE</LF:field_value>
                </LF:field_values>
            </LF:metadata>
            <LF:electronic_document content_type="application/pdf" extension="pdf" extract_text="false">
                <LF:fileref ref="FILEPATH" />
            </LF:electronic_document>
        </LF:document>
        <LF:document name="DOC 2" template="TEMPLATE">
            <LF:metadata>
                <LF:field_values>
                    <LF:field_value name="FIELD">VALUE</LF:field_value>
                </LF:field_values>
            </LF:metadata>
            <LF:electronic_document content_type="application/pdf" extension="pdf" extract_text="false">
                <LF:fileref ref="FILEPATH" />
            </LF:electronic_document>
        </LF:document>
   </LF:toc>
</LF:importengine>

You can find something similar in the following folder wherever you have Import Agent installed in a file called "Multiple Electronic Document Example.xml"

C:\Program Files\Laserfiche\Import Agent\List File Examples

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

Sign in to reply to this post.