« Free Designer client is a double-edged sword | Main| Selfless Soldier had Volunteered for Duty »

Share this Column


Did you catch my earlier post on UI?  It reminded me of my favorite shared column.  Why should you just display a paper clip in a view when the document has an attachment when you can add value by displaying what kind of attachment it has?   Try this formula and be sure to check Display values as Icons.

extList := ".ODS":".XLS":".ODF":".DOC":".ODP":".PPT":".NTF":".TXT":".MP3":".ZIP":".PDF";
ext := @UpperCase( @Right( @AttachmentNames; 4 ) );
choice := @Member( ext; extList );
@If( @Attachments > 5; 30:30;
        @Attachments > 1;150 + @Attachments;
        @Attachments = 0; 0;
        @If( choice = 0; 5; @Select( choice; 141;141;142;142;143;143;145;1;15;10;171) ) )

To add other icons, add the extension to the first line, and add the icon number to the last line.  Also note that in ND 8, the icons for the M$ products have changed to a generic icon, despite the documentation.  

Also note that if you want to modify the mail template, this column is copied to every folder, which needs to be modified separately.  And if you want help interpreting the formula, the first clause checks to see if the version of Notes is less than R4 - you can probably safely remove this clause along with its other clauses that start with the @IsAvailable( $ContentIcon) phrase.  You can then fit this @if into the remaining @If statement.

Category

Post A Comment

Feeds

Custom Button Custom Button

Category Cloud

Disclaimer

The views expressed by the authors on this blog do not necessarily reflect the views of Teamstudio, those who link to this blog, or even the author’s mother, father, sister, brother, uncle, aunt, grandparents, cousins, step relations, any other blood relative - and sometimes not even the author himself or herself.

Comments on this website are the sole responsibility of their writers and it is assumed those writers will take full responsibility, liability, and blame for any libel or litigation that results from something written in, or as a direct result of something written in, a comment. The accuracy, completeness, veracity, honesty, exactitude, factuality and politeness of comments are not guaranteed. Oh, how they are SO not guaranteed.
en-us,en;q=0.5OFFCCBot/1.0 (+http://www.commoncrawl.org/bot.html)38.107.179.214getthemostfromnotes.comHTTP/1.180Lotus-Domino/tsblog.nsf/D6Plinks/SJON-7XEHKS_Share_This_Column