Special action ... SmartIcon @Formula for day-to-day tasks

Special action ... SmartIcon @Formula for day-to-day tasks

Have you ever needed that special function but it is not included in the design ... yet? Have you ever written a Smart Icon to do a specialized Action .. and another one .. and yet another one, just to realize that you have run out of space for new SmartIcons? YES?!?

Then here is the Answer, the "Special Action ..." Smart Icon formula.

It covers things like:
- Generate a Password/Unique Value
- Add a Signature
- Select Documents by Date
- Forward the current Document
- Check / Set the Form used
- Open Doc by UNID
... and more.

The entries are First Letter coded, so you have quick access to all the Functions and the List can easily be extended.

Have fun and please write you comments to: sirius@NOSPAMgmx.net
Bjoern-Erik

REM "======================================";
REM " == Special Action ... SmartIcon @Formula      ==";
REM " ==       By Bjoern-Erik Wenz (C) 6/2002          ==";
REM " ==       email: sirius@NOSPAMgmx.net           ==";
REM " == Free Distribution allowed, provided this      ==";
REM " == REM-Header stay's complete & intact!       ==";
REM "======================================";

ListAll := "Password Generate/Unique Value|GenPWD":
                   "Signature append "Name-Job-Dept"|SigAP":
                   " Append External Footer "TelFaxEmail"|InsExt":
                   "  Mailing Address|InsMail":
                   "Document Selection by Date|SelByDate":
                   "Forward current Document|FwdDoc":
                   "Check / Set Form|SetForm":
                   "Authors for current Document|ShowAuthors":
                   "Open Doc by UNID from View|OpenDocUNID":
                   "Not Used 3|X3":
                   "Z OutBox Scan+ Send Mail ...|ScanOutbox";
ListDefault:=2;

REM "Declare Temporary Variables for later use ...";
X := "";
RMM := "";

REM "Declare Signature Variables for later use ...";
SigName := "Bjorn-Erik Wenz";
SigJobTitle := "Infrastructure / LN Development AsiaPacific";
SigDepartment := "Group IS - Information Systems";
SigCompany := "My Company Pty. Ltd.";
SigPhone := "Tel: +61-1-2345-6789";
SigFax := "Fax: +61-9-8765-4321";
SigMobile := "Mob: +61-123-456-789";
SigEmail := "User.Name@my.company.com";
SigAddress := "123 River View Drive, Suburb QLD 4567 - AU";
SigWeb := "Web: http://www.my.company.com/";

REM "Don't change anything below unless you add another item, just modify the list and the default (as number) above!";
REM "================================";

List := @Right(ListAll;"|");
ListT := @Left(ListAll;"|");
BMSel:=@Prompt([OKCANCELLIST]:[NoSort];"Special Action ...";"Choose Action to perform ...";@Subset(@Subset(ListT;ListDefault);-1);ListT);
REM "================================";
Sel := @Subset(@Subset(List;@Member(BMSel;ListT));-1);

@If(
RMM="================================";"";
Sel="GenPWD";@Do(
@Prompt([OKCANCELEDIT];"Password";"The Password is:";@Password(@Prompt([OKCANCELEDIT];"Password";"Enter Text to convert into Password:"+@Char(10)+@Char(10)+"(Note: The Default is a Unique Value)";@Unique)))
);
RMM="================================";"";
Sel="SigAP";@Do(
   @If(@IsDocBeingEdited;"";@Return(-1));
@Command([EditInsertText];@NewLine+@NewLine);
@Command([TextNormal]);
@Command([EditInsertText];"Best Regards");
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigName);
@Command([EditInsertText];@NewLine);
@Command([TextSetFontColor];[Red]);
@Command([EditInsertText];"----------------------------------------------------");
@Command([TextReduceFont]);
@Command([EditInsertText];@NewLine);
@Command([TextSetFontColor];[Gray]);
@Command([EditInsertText];SigJobTitle);
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigDepartment);
@Command([TextEnlargeFont]);
@Command([TextNormal])
);
RMM="================================";"";
Sel="InsExt";@Do(
   @If(@IsDocBeingEdited;"";@Return(-1));
@Command([EditInsertText];@NewLine);
@Command([TextNormal]);
@Command([TextReduceFont]);
@Command([TextSetFontColor];[Blue]);
@Command([EditInsertText];SigCompany);
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigPhone);
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigFax);
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigMobile);
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigEmail);
@Command([EditInsertText];@NewLine);
@Command([TextEnlargeFont]);
@Command([TextSetFontColor];[Red]);
@Command([EditInsertText];"----------------------------------------------------");
@Command([TextNormal])
);
RMM="================================";"";
Sel="InsMail";@Do(
   @If(@IsDocBeingEdited;"";@Return(-1));
@Command([EditInsertText];@NewLine);
@Command([TextNormal]);
@Command([TextReduceFont]);
@Command([TextSetFontColor];[Blue]);
@Command([EditInsertText];SigAddress);
@Command([EditInsertText];@NewLine);
@Command([EditInsertText];SigWeb);
@Command([TextEnlargeFont]);
@Command([TextNormal])
);
RMM="================================";"";
Sel="SelByDate";@Do(
   @If(@IsDocBeingEdited;@Return(-1);"");
@Command([EditSelectByDate])
);
RMM="================================";"";
Sel="FwdDoc";@Do(
   @If(@DocFields ="";@Return(-1);"");
@Command([MailForward])
);
RMM="================================";"";
Sel="SetForm";@Do(
@If(@IsAvailable(Form);"";
@Prompt([YESNO];"*Note:  Form field missing, set to Memo or else ... ?");"";@Return(""));
@SetField("FORM";@Prompt([OKCANCELEDITCOMBO];"Select from List or type in Desired Value:";"Set Form from: "+Form;Form;"Memo":"Document":Form))
);
RMM="================================";"";
Sel="ShowAuthors";@Do(
   @If(@DocFields ="";@Return(-1);"");
@Prompt([OK];"Authors for this Document";@Implode(@Author;", "))
);
RMM="================================";"";
Sel="ScanOutbox";@Do(
@Command([WindowWorkspace]);
@Command([FileOpenDatabase];"":"mail.box");
@Command([ToolsScanUnreadSelected]);
@Command([FileCloseWindow]);

@If(@Prompt([YESNO];"";"Send Mail?");"";@Return(1));
@Command([Replicator]);
@Command([ReplicatorSendReceiveMail]);
@If(@Prompt([YESNO];"";"Return?");"";@Return(1));
@Command([FileOpenDatabase];"":"mail.box");
@Command([FileCloseWindow])
);
RMM="================================";"";
Sel="OpenDocUNID";@Do(
@Set("X";@If(@IsAvailable($REF);@If(@Prompt([YESNO];"$REF Found";"Document is a Response/Conflict Document. Do you want to default to $REF ?");@Text($REF);@Text(@DocumentUniqueID));@Text(@DocumentUniqueID)));
@Set("X";@ReplaceSubstring(@Prompt([OKCANCELEDIT];"Open Document by UNID from View ...";"Enter the UNID (DocumentUniqueID) of the Document to open:"+@Char(10)+"(32 Characters and may include"+@Char(10)+" -/:/space/OF/ON/_/#)"+@Char(10)+"(Note: This will work only from a view!)";X);":":"-":"OF":"ON":" ":"_":"#";""));
@If(X="";@Return(-1);@Length(X)=32;"";@Return(@Prompt([OK];"Error";"The UNID entered is not valid. Must be 32 Characters long exactly!"+@Char(10)+" > "+X+" <")));
@Command([OpenDocument];"0";X)
);
RMM="================================";"";
Sel="X3";@Do(
@All
);
@Return(-1))
This was first published in June 2002

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close