Your Development & Design Resource
SmartIcon: NotesItem Mailer
01/18/2007 08:51 AM by Chris Toohey
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.