dominoGuru.com

Your Development & Design Resource

SmartIcon: NotesItem Mailer

Here's something that we slapped together recently that I needed when having to quickly grab all items from a given document. It's not the prettiest thing in the world, but it allows me to get some quick-and-dirty information on a given document!

What we have here is formula that I've put into a SmartIcon. This "function" allows me to select a given document in a database, and with a single click I'll receive an email that details all NotesItems in the document along with their respective values. I've added a carrot (^) as a seperator between the NotesItem name and it's correlating value. This allows me to take the resultant "table", copy/paste into Microsoft Excel (or whichever spreadsheet app you choose), and break the data into columns using ^ as my delimeter.

temp := "";
tmp := @DocFields;
@For(n := 1; n <= @Elements(tmp); n := n + 1;
temp := temp + tmp[n] + "^" + @Text(@GetField(tmp[n])) + @NewLine);

@MailSend( @UserName ; "" ; "" ; "Field Values" ; temp ; ""; "" )

It's pretty simple and to the point, and it got me data from given documents in any database without a lot of headaches! And please note - you're limited to size here (as well as a few other things) - I use this to grab quick information from relatively moderate-sized documents. Running this on a document with 1000 NotesItems with a chapter's worth of data stored in each will result in "Out of Memory"-styled errors.


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.