Using ScanEZ to modify multiple fields on multiple documents

This is a small tip I would like to share with all users of Ytria’s ScanEZ. Last week I had to modify hundrets of documents in the Domino directory. The domain part of the user’s internet address had to be changed to a new domain.
The old internet mail address should be added to the FullName field to make sure that mail is delivered when the sender does not use the new internet mail address. Here is my formula:

_oldSuffix:="witte-velbert.de";
_newSuffix:="witte-automotive.de";
@If(!@Contains(@LowerCase(InternetAddress);"proepper":"krosta":"witte-automotive");
@Do(
tmp:= @Implode(FullName;"#");
tmp:= tmp + "#"+ @LowerCase(InternetAddress);
@SetField("FullName";@Explode(tmp;"#"));
@SetField("InternetAddress";@ReplaceSubstring( @LowerCase(InternetAddress) ;_oldSuffix ; _newSuffix))
);
"")

I know that ScanEZ can use formulas to modify a field in multiple documents; but I could not find any tip on how to modify multiple fields in multiple documents at a time using formulas (i.e. a formula that will compute with respect to the current document) in ScanEZ. There is a how-to in the FAQ on the Ytria site, but this does not fit my needs

I played around with this awesome tool and here is what I found out.

  • Select the documents to be modified

    Select Documents

  • Choose “Open selected documnet(s) in ScanEZ” from the Actions menue
  • Select one document from the documents collection
  • Leftclick on the collection’ header
  • Click the “Diff” button

    ScanEZ

  • Rightclick an entry in the right window and select “Modify Values” from the context menue

    Modify Values

  • Click the “@” button to use a formula; type the fieldname for a temporary field into the name field ( be sure that the fieldname is not part of the document )

    Temporary Field

  • Type your formula into the field at the buttom of the dialog

    Formula

  • Click the “OK” button

After the changes are done, you can delete the temp field from all documents.

One thought on “Using ScanEZ to modify multiple fields on multiple documents

  1. Hi Ulrich,

    Nice tip.

    Another way you can do this is to directly set the value of the field InternetAddress. That way you won’t need to create a new “temp” field.

    Check out the following formula:

    _oldSuffix:="witte-velbert.de";
    _newSuffix:="witte-automotive.de";
    
    @If(@Contains(@LowerCase(InternetAddress);"proepper":"krosta":"witte-automotive");
    @Return(InternetAddress);"...");
    
    tmp:= @Implode(FullName;"#");
    tmp:= tmp + "#"+ @LowerCase(InternetAddress);
    @SetField("FullName";@Explode(tmp;"#"));
    @ReplaceSubstring( @LowerCase(InternetAddress) ;_oldSuffix ; _newSuffix);
    

    It’s like using an agent with a return value.

    You can even use the FIELD keyword in your formula (useful with the @DeleteField formula, if you want to delete a field at the same time), get/set values from a Profile Document or any other document (use @GetDocField), and even use @DbLookup or @DbColumn results.

    Eric Houvenaghel
    YTRIA

Comments are closed.