Ytria logo DOCUMENTATION
⚠ This page requires javascript enabled in browser
Automation / scanEZ Automation

 

Tag: ModifyItem

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

<ModifyItem OnMissing="skip">
<SetParam field="TypeList" value="number"/>
<SetParam field="FieldName" value="autoCreateNUM"/>
<SetParam field="FieldValue" value="29"/>
<SetParam field="IsProtected" value="true"/>
</ModifyItem>

Tag Attributes

AttributesAttribute ValueValue DescriptionComment
OnMissingSkip

Create

Cancel

Defines the action to take if the item already exists within the documentNot mandatory – see detailed description below

SetParam Options

Field NameCompatible Field ValuesValue DescriptionComment
TypeListText

Text List

Number

Number List

Date

Date List

Authors

Names

Readers

Formula

Dropdown 'Type' list optionsMandatory
FieldNameUser definableValid field name of your choice (Date and Date List type items must be in the proper format)Mandatory
FieldValueUser definableValid field value of your choiceOne must be selected
FieldFormulaUser definableValid formulaOne must be selected
IsSummaryTrue/FalseFlag checkbox stateNot mandatory – see detailed description
IsEncryptpedTrue/FalseFlag checkbox stateNot mandatory – see detailed description
IsSignedTrue/FalseFlag checkbox stateNot mandatory – see detailed description
IsProtectedTrue/FalseFlag checkbox stateNot mandatory – see detailed description
FieldSeparatorNew Line

Semicolon

Comma

Space

Tab

Dropdown 'Separator' list optionsMandatory for TypeList values 'Text List', 'Number List', and 'Date List'.

Detailed Description

By default, omitting the attribute OnMissing will have the same effect as <ModifyItem OnMissing="Create"> which is the equivalent of the 'Create' button on the Warning dialog displayed when trying to modify an item that does not exist in the target documents.



NoteThe checkbox option 'Apply to all documents' always acts as if engaged when using the ModifyItem 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 'Modify Item' dialog.

Example Script

<?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"/>
<ModifyItem OnMissing="skip">
<SetParam field="TypeList" value="Number"/>
<SetParam field="FieldName" value="AutoCreateNum"/>
<SetParam field="FieldValue" value="29"/>
<SetParam field="IsProtected" value="true"/>
</ModifyItem>
</ytriaAutomation>


    In the script above, the database "Testcopy.nsf" will be opened and the focus placed on the document type "Document". The ModifyItem action will be launched on all documents within the focused selection tree node, setting all items named "AutoCreateNum" found to Number-type items with a value of "29" and a flag set for 'Protected'.