Share this Column
Tags: Development
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.
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.

