For a recent customer, we were using quite a few views on the web, and there was one view template for all the views. With a couple of the views there was a chance for the view to be empty, which leads to the standard No documents found Domino message. This customer wanted to customize this message. Luckily, the site was for an intranet and all their employees used IE, so the solution was quite a bit easier than what we’ve done in the past.
Read more…
Viewed 6944 times by 1817 viewers
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 5330 times by 1467 viewers
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 7526 times by 2519 viewers
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 5688 times by 1540 viewers
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 5353 times by 1402 viewers
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 5330 times by 1463 viewers
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 6483 times by 1947 viewers
One of the drawbacks of computed text is that you can’t put a hotspot around it. But, if you’re using a form design element (either a regular form, or a $$Template), then there is a way to get the text of a hotspot to be dynamic.
What you want to do is create a computed for display text field. The value of the field is the same as what your computed text used to be. So now this field will display a text value, and it will be the same as your computed text.
You can now put a hotspot around a compute for display field. Viola! You have a hotspot where the “clickable” text is computed.
Read more…
Viewed 7219 times by 1985 viewers
For those of you that write Java in Notes, you have probably realized that it doesn’t matter what version of the Java Virtual Machine (JVM) you have installed on your system (workstation or server) because Notes uses a set JVM version. But which one? This little piece of Java code can tell you what JVM is being used.
Read more…
Viewed 7350 times by 2234 viewers
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 11029 times by 3814 viewers