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

Question

Question

Import Multi fields

asked on November 16, 2017

Hi,

 

We use Import Agent and LST files to import images into our LF repository.  How do we manage importing data into a field which is an "allow multiple entries"?  What would our LST file need to look like?

 

Thanks,

Anthony

 

0 0

Answer

SELECTED ANSWER
replied on November 16, 2017

You need to use the XML list file format to import multivalue fields, using the "position" attribute in the field_value node to set the positions. The LST format is the legacy method and does not support multivalue fields. Here is an example:

<?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="unique">
      <LF:document name="Sample document" template="Sample template">
        <LF:metadata>
          <LF:field_values>
            <LF:field_value name="Field1" position="0">value 0</LF:field_value>
            <LF:field_value name="Field1" position="1">value 1</LF:field_value>
          </LF:field_values>
        </LF:metadata>
      </LF:document>
    </LF:toc>
</LF:importengine>

 

1 0
replied on June 6, 2023

How does this work with multi field groups?

0 0
replied on June 7, 2023

The "rownumber" attribute can be used to set the multivalue row number:

 

<?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="unique">
      <LF:document name="Sample document" template="Sample template">
        <LF:metadata>
          <LF:field_values>
            <LF:field_value name="Field1" position="0" rownumber="1">value 0</LF:field_value>
            <LF:field_value name="Field1" position="1" rownumber="2">value 1</LF:field_value>
          </LF:field_values>
        </LF:metadata>
      </LF:document>
    </LF:toc>
</LF:importengine>

For more information, see ImportEngine.xsd in the SDK installation.

1 0

Replies

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

Sign in to reply to this post.