Skip to main content
Skip table of contents

Create Items

Tag: CreateItem

The CreateItem action, along with the applicable SetParam child actions, lets you automate the 'Create Items' process launched by clicking on the 'Create' button found in the Diff/Values panel in scanEZ.

Detailed Description

By default, omitting the attribute OnExisting will have the same effect as <CreateItem OnExisting="Create"> which is the equivalent of the 'Replace' button on the Warning dialog displayed when creating an item that already exists in the target documents.





The checkbox option 'Apply to all documents' is always engaged when using the CreateItem action.


The minimum block of SetParam child actions will consist of:

      1. TypeList and value
      2. FieldName and value
      3. FieldValue (for a fixed value) or FieldFormula (for a calculated value)
      4. FieldSeparator and value—for List-type items only


      If omitted, the additional SetParam 'Flag' options IsSummary, IsEncrypted, IsSigned, and IsProtected will be their default values set for the New Items dialog.

      Tag Attributes

      AttributesAttribute ValueValue Description
      OnExistingSkip

      Create

      Cancel

      Defines the action to take if the item already exists within the document - Not Required (See detailed description)

      SetParam Options

      Field NameCompatible Field ValuesValue Description
      TypeListText

      Text List

      Number

      Number List

      Date

      Date List

      Authors

      Names

      Readers

      Formula

      Dropdown 'Type' list options Required
      FieldNameUser definableValid field name of your choice Required
      FieldValueUser definableValid field name of your choice - One must be selected
      FieldFormulaUser definableValid formula - One must be selected
      IsSummaryTrue/FalseFlag checkbox state Not Required (See detailed description)
      IsEncryptedTrue/FalseFlag checkbox state - Not Required (See detailed description)
      IsSignedTrue/FalseFlag checkbox state - Not Required (See detailed description)
      IsProtectedTrue/FalseFlag checkbox state - Not Required (See detailed description)
      FieldSeparator[New Line]
      [Semicolon]
      [Comma]
      [Space]
      [Tab]
      Dropdown 'Separator' list options - Required for TypeList values "Text List", "Number List", and "Date List".

      Example Scripts

      XML
      <CreateItem OnExisting="skip">
      	<SetParam field="TypeList" value="number"/>
      	<SetParam field="FieldName" value="autoCreateNUM"/>
      	<SetParam field="FieldValue" value="29"/>
      	<SetParam field="IsProtected" value="true"/>
      </CreateItem>
      XML
      <?xml version="1.0" encoding="UTF-8"?>
      <ytriaAutomation Application="scanEZ" ApplicationVersion="16.5" Version="1.0">
      	<Load Server="ACME01/ACME" database="Testcopy.nsf"/>
      	<focus target="tree" category="Documents" type="Document"/>
      	<CreateItem OnExisting="skip">
      		<SetParam field="TypeList" value="Number"/>
      		<SetParam field="FieldName" value="AutoCreateNum"/>
      		<SetParam field="FieldValue" value="29"/>
      		<SetParam field="IsProtected" value="true"/>
      	</CreateItem>
      </ytriaAutomation>

      In the script above, the database "Testcopy.nsf" will be opened and the focus placed on the document type "Document". The CreateItem action will be launched on all Documents within the focused selection tree node, creating a new Number-type item named "AutoCreateNum" with a value of "29", and with a flag set for 'Protected'.


      JavaScript errors detected

      Please note, these errors can depend on your browser setup.

      If this problem persists, please contact our support.