I had to create a form to be used by R5 clients and part of the form had to display a variable number of urls, with an image used for the bullet. The data had to be written from a COM call outside Notes, and the form stored with the mail send. Ugliness all around. I decided that to get the job done without overall complexity getting the better of the project, I would just have 100 fields, hidden when empty, each prefaced with the image. Of course, in R5 you didn't have "@This..." functions, so you have to hand create all 100 fields -- and if you don't get it just write, do it again.
Instead, I create an empty database with just one form on it, and on that form I create just one of the fields and its prefaced image. Then I used the sample DXL export routine from the help file and dumped that sample database to disk. By opening the resultant xml file in a text editor, I found the code for the field. It was like this:
<pardef id='1'><code event='hidewhen'><formula>targetlink1 = ""</formula></code></pardef><par def='1'><picture width='12px' height='17px' scaledheight='0.1771in' scaledwidth='0.1250in'><jpeg>/9j/4AA{content deleted}/2Q==</jpeg></picture><urllink showborder='false'><code event='value'><formula>targetlink1</formula></code><run><font color='system'/> </run><run><font color='blue'/><field type='text' kind='computed' name='link1'><code event='defaultvalue'><formula>displaylink1</formula></code></field></run><run><font color='system'/></run></urllink></par>
Next, I created some LotusScript to duplicate that string, only substitute the next numeric for the fieldname used in the field properties and all the formulae. Finally, just copied the repeated text into the original dxl, and again using nothing but the sample code from the help file imported that dxl into a new database. Once I had the database reconstituted, I opened the form, copied all 100 fields, and pasted them into the form I was working on.
Ok, its a nasty hack -- but it saved me a TON painstaking, error prone work.
Comment Entry |
Please wait while your document is saved.