Archive

Archive for the ‘LotusScript’ Category

Lotus Notes Refresh Parent document When Closing Child document

During development of a new application, we ran across a situation that I’m sure some of you have seen. We have a parent document and children documents. The children are only displayed in an embedded view in the parent document. So, when you open up the parent, you see an embedded view with “show single category” enabled that shows all the children of that parent. Those children don’t show up in any other view, so you must open up the parent to see them. There’s buttons in the parent to create a child, edit a child, delete a child, etc.
Read more…

Viewed 7547 times by 1863 viewers

Prevent Validation Errors When F9 Is Pressed in Lotus Notes

There’s always the trouble with validation formulas executing when you don’t want them to execute. For example, if you have a radio button set to “Refresh Fields On Keyword Change”, then validation formulas will execute when the value changes and your users will get prompted with their errors. This would be a case where you don’t want the users to be prompted.
Read more…

Viewed 6630 times by 1795 viewers

Determine User Screen Resolution in Lotus Notes

If you would like to open a different navigator based on the user’s screen resolution, there is a pretty easy way to do it using the Windows API (assuming your clients are Windows clients).
Read more…

Viewed 4663 times by 1204 viewers

How to Check Is Valid Lotus Notes ID

This JavaScript regular expression will validate a Notes ID. To use the function, call “isValidNotesID” and pass in the Notes ID to be checked and an optional parameter of the number of slashes that should be in the ID. If the parameter is omitted, it defaults to 1 slash. For example, if the ID is supposed to be in the format of “John Doe/MyCompany”, then you can call isValidNotesID(myString). But if the format is supposed to be “John Doe/MyCity/MyCompany”, then you’ll need to call isValidNotesID(myString, 2).
Read more…

Viewed 7584 times by 2062 viewers

Lotus Notes Agents: Run As Web User vs. Signer

We were working on a web application recently. The application was to be used on the client’s server and had only one “foreground” agent (accessed through the ?OpenAgent URL). Since we wouldn’t have access to run agents on their server, the agent was set up to run as the current web user. The agent, when this setting is enabled, runs under the authority of the currently logged-on web user (or under “Anonymous” if the user hasn’t authenticated). Or so we thought…
Read more…

Viewed 6525 times by 1888 viewers

Lotus Notes Refresh Design In LotusScript

Starting with version 5.03 of the Notes API, the ability to refresh the design of a database through the API has been exposed. The API call, in its most basic form, is surprisingly easy to use in LotusScript. This tip shows you how to do it.
Read more…

Viewed 5673 times by 1550 viewers

Lotus Notes Tutorial – Basic Edit History

If you’ve been developing in Notes for any amount of time, one thing you’ve probably accumulated in your “bag of tricks” is an “Edit History” subform where the dates/times of the most recent edits are shown. Here, I’ll talk about our basic edit history subform. This is called “basic” because it only shows overall edits (who and when) instead of tracking changes to specific fields. Tracking changes to fields is a lot more involved, so I’ll leave that for another time.

Read more…

Viewed 7974 times by 2208 viewers

Lotus Notes Web – Converting Host Name To IP Address

Lotus Notes Web – This code was found on a Visual Basic web site and converted to LotusScript. It is a LotusScript class that allows you to convert a host name to its IP address. To use, create a new HostName object.

Then check the IPAddress property of the new object to get the IP address. The property is a string.

This code is best stored in a script library. Create a new script library, then go to the (Declarations) section. The first part of that section is some constants:
Read more…

Viewed 7766 times by 2225 viewers

Missing From Lotus Notes Array

After using the Are Arrays Equal function in LotusScript for a while, a comment came from one of our developers: “This is good and all, but how do I know what is different about the two arrays?” The other function simply exits when finding a difference. So it makes sense to just keep track of the differences and then return those differences somehow. But there’s two types of differences:

Read more…

Viewed 5772 times by 1492 viewers

Check Lotus Notes Arrays Equal

In a recent project, we had the need to compare two arrays to see if all the elements in one array were in the other array and vice versa. The elements didn’t have to appear in the same order in the arrays to be equal. So that prompted a generic “AreArraysEqual” function.
Read more…

Viewed 6402 times by 1960 viewers