As much as the world has moved on from Notes to a greater or lesser degree, there are some companies who retain systems that run on one or more Notes applications. This has always been part of Notes’ brilliance – the ability to have an application up and running year after year with little maintenance.
Recently, I was approached to do a little maintenance on an existing Notes application. An application that has been running for nearly 20 years.
Add a data entry screen to an existing IBM Notes application that would recreate a tick box matrix originally done in Excel. The existing excel form consisted of ~150 rows and 14 columns, 12 of which were clickable.
- Each action should allow the text of that action to be edited by an admin user.
- Each row should be capable of being configured to run as either a radio button (single value) or a checkbox (multi-value).
- Each clickable area MUST sit in it’s own table cell.
XPages weren’t an option as some of the clients are Basic rather than Standard. It had to be a form.
150 rows multiplied by 12 clickable areas means 1800 clickable items. Throw in the radio/checkbox option and we are up to 3600 fields just for the clickable areas alone!
I won’t go into the whole solution – it’s a bit long winded – but, I’ll give you enough background to see why I chose DXL editing.
The solution I came up with is effective albeit very old school: action hotspots on pictures with hide when formulae. The on click event of the “tick” hotspot would populate a hidden field with a value which would then show or hide the tick as appropriate. All very good once the logic was worked out. It was shown to the client and they were delighted. Smiles.
Now, came the labour intensive part: repeat this for the other 149 rows. A simple copy and paste of the row would result in 125 changes to various formulae per row: 18,265 individual text changes, not including clicking. Grrh!
The Pareto Principle is very much in effect in Domino Designer, and it was definitely one of the 80% of underused items that helped me on this occasion: Edit with DXL. It’s accessed by right-clicking on the element you want to edit and choosing “Edit With DXL”.
This option allows you to directly edit a design element in Domino XML (DXL). In my case, this showed a text representation of the binary form. From here I could copy and paste the line that I needed and manipulate the text easily with find and replace. The whole exercise was now reduced from a large amount of time to around 40 minutes.
Be careful when dealing with Paragraphs in DXL. It seems as though each paragraph
<br /> <tablecell valign='center'><br /> <pardef<br /> id='8'<br /> align='center'<br /> keepwithnext='true'<br /> keeptogether='true'<br /> ><br /> <code event='hidewhen'><br /> <formula>!@IsMember("AMS"; ResponsibleTeam)</formula><br /> </code><br /> </pardef><br /> <par def='8'><br /> <actionhotspot hotspotstyle='none'><br /> <code event='click'><br /> <formula>actionCode := "AMS";</p> <p> @If(ActionFieldType = "Radio"; @SetField("ResponsibleTeam";"");<br /> @SetField("ResponsibleTeam"; @Trim(@Replace(ResponsibleTeam;<br /> actionCode; ""))));<br /> @Command([ViewRefreshFields])<br /> </formula><br /> </code><br /> <picture<br /> width='32px'<br /> height='32px'<br /> ><br /> <imageref name='tick.png' /><br /> </picture><br /> </actionhotspot><br /> </par><br /> </tablecell><br />