Archive

Archive for the ‘LotusScript’ Category

Add Image With Text On Top of Lotus Notes Designer

When creating a new application recently, I was given a logo image by the customer to be included in the upper left corner of the application (it was a Notes client application). The customer wanted also to have the application name appear on top of the image.
Read more…

Viewed 5201 times by 1446 viewers

Using Lotus Notes Color Fields

The Notes Designer help on color fields is a little confusing. It’s talking about having your column formula go against a profile and all kinds of confusing items. That’s the way it was described because that’s the way the mail template uses color fields. But let’s say you have an application and you want different documents to show up with different foreground and background colors in the views, but you want these values to be controlled by an administrator. It’s an application used by many people, but the color control only comes from a few people. Do you have to do this the way the profile talks about?
Read more…

Viewed 6191 times by 1912 viewers

LotusScript equivalent to @IsValid

We really like the @IsValid formula to check to see if a document is valid before performing another operation, but sometimes we’re not using formula language, so a script equivalent is needed.

When writing script and you want to find out if the current document has any validation errors, use this code:
Read more…

Viewed 5396 times by 1478 viewers

How to Swapping Rich Text Fields in Lotus Notes with LotusScript

Recently a developer of ours had a need to swap two rich text fields on a form. The rich text fields were going to be text only (no attachments or images) but the customer wanted to be able to use things like bold and colors in the two fields that were to be swapped, so they had to be rich text. If the two fields were regular text fields, then swapping their values is pretty straightforward – you swap the two fields in the back end, perform a reload and a refresh in the front end, and you’re done.
Read more…

Viewed 7610 times by 2538 viewers

Combining Many Lotus Notes Views Into One

Recently, we were working on a project where one requirement was to have, according to the specifications, “one view per department showing…”. It turns out that the design of the views were going to be identical, they just wanted to see only one department at a time.
Read more…

Viewed 5763 times by 1557 viewers

Lotus Notes Working With Custom Classes

Custom classes in LotusScript have been around as long as LotusScript (since version 4 of Notes), but with the introduction of Web Services in version 7, they are going to become more and more important. If you don’t already know, when creating a web service you have to code things in a custom class when the web service is coded in LotusScript. This quick article tells you how I work with custom classes in LotusScript, which might be of some help to you.
Read more…

Viewed 5422 times by 1418 viewers

Lotus Notes Debugging Practices

The first thing that we do is follow a set structure for all our LotusScript. If it’s a function or subroutine (in a script library, as part of an agent, as part of a form, etc), then here is the structure:
Read more…

Viewed 5406 times by 1484 viewers

Lotus Notes why Error Loading USE or USELSX

After nearly punching a hole in my computer monitor recently, I learned something that I thought I’d share with all of my readers. (and it’s not “don’t punch a hole in your computer monitor”).
I was working on an application that has a lot of LotusScript code in forms, views, agents, script libraries, and everywhere else. I was trying to update a form but was getting the “error loading USE or USELSX” error. Notes couldn’t bring in one of the script libraries. OK. That’s fine. I’ve seen that before. I commented out the script library and the function calls in the script library so I was able to save my form. I went back in, removed the comments from everything, and got the same error.
Read more…

Viewed 6566 times by 1967 viewers

Lotus Notes Trapping Messages Marked Return Receipt

In a Notes mail message, you can set all kinds of delivery options. One of the options is “Return Receipt”. If this setting is enabled on a message you send, you will receive an email back when the recipient opens the message. The only way the recipient knows about the “return receipt” setting is after the fact when they see “return receipt submitted for delivery” in their status bar. With this tip, you can identify messages that have this setting enabled.
Read more…

Viewed 11126 times by 3843 viewers

Lotus Notes Script Reading/Writing Windows Clipboard

If you have a need to read the windows clipboard (or write to it) while in LotusScript, this custom class makes it easy. Create a Script Library, and call it Windows Clipboard. Go into the (Declarations) area of the script library, and put in this class definition.
Read more…

Viewed 11927 times by 3054 viewers