Home > Domino Tips > Administrator > Smart Icons > Special action ... SmartIcon @Formula for day-to-day tasks
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SMART ICONS

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


Sirius Sirius
06.25.2002
Rating: -3.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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

Code

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))

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Smart Icons
Smart icon to set field value/type, version 2
Easy way to count members of a group
SmartIcon code to display any open database's ReplicaID
SmartIcon shortcut to server
Quick admin function in Notes client
Get the size of a user's mail database while in the Domino Directory
Quick import-export smart icons
Set field value/type via smart icon
SmartIcon to open a mailfile from NAB
Add mail file icon from NAB

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts