Monday 4 April 2011

Button to open db on a particular server

We have many servers in our environment and we try to make sure users use their local server for their applications.  Below is a simple button to force a user to open an application on a particular server, which will place this replica on top of their replica stack.

Saturday 2 April 2011

Excel formula

I have a notes application as a replacement for MS Money 2008.  Every month I import all of my account transactions into a notes database, via CSV import and it checks previous entries to categorize each transaction.  This allows me to see where my wife spends all of my money each month!

Occasionally I get lazy and do not download the transactions within the statement period and so the only way to import the  transactions is to copy and paste the HTML table from the statement on the screen.  When I paste this into Excel, it thinks it is text.  The problems start when I try to convert the text into a number, so that it can be imported.  Everything I had tried failed, such as various paste special techniques, convert cell and copy paste from notepad etc...

Friday 1 April 2011

XML - Part three - Import

This is the third XML article in this mini series.  Please take a look at Part One, which talks about the Script Library and Part Two, which talks about the export agent, if you have not already seen these.

The second agent I have written allows a user to import an XML file and replace all of the document fields with the values found in the XML document.

My code takes the first "Document" from the "Documents" tree and finds the <id> value, which is used as a key to find the document.  With the <id>, I can find the document and then run through all of the fields in the XML and replace the values within the document.  The field name is the same in the document as it is in the XML file, so no mapping is required in this example.

XML - Part Two - The Export

This is the second XML article in this mini series.  Once you have created the script library in your database (Part One), you can create the first of the two agents.

The agent below allows a user to export the selected documents as XML.  This creates an XML tree of "Documents", with each "Document" being a node.  This code fixes the file destination to "C:\Temp\Document.xml", so you will have to change this to fit your requirements.

I use a view to handle the field names to export, as I do not want to export every field.  My field configuration will be the subject of a further post.  For now, think of it as a list of field names where there is one document per field.

XML - Part One - The Script Library

I am going to write a three part post on how to handle the importing and exporting of XML files into Lotus Notes.

Recently, I had a requirement to export a number of documents to XML.  The file would then be read into a customers helpdesk, which was not Lotus Notes based.

I have exported to XML before and have kept a Script Library in my "black box" for this very purpose.  I did not write the script library, but I will share the code here.

Google stop me embarrassing myself

I was just sending an important email, with a very important attachment... When I pressed the Send button, it stopped me and warned me that I have written "I have attached", and it then realised that I had forgotten to attach my document.



Thank you Google for reminding me to attach my document.