Case-insensitive @Unique version combines fields on Lotus Notes forms

The @Unique function is case sensitive, which can cause problems if you use it to combine values from different fields with differing cases. Here's another Formula language function that will work.

Lotus Notes/Domino developers commonly use the @Unique function when combining lists. When working on a Domino application, I needed to combine values from two different fields that had different data sources and were in different cases.

I tried combining the two fields and using @Unique to eliminate duplicate values. However, because @Unique is case sensitive and the two sources often listed the same values in different case, this didn't work. Another problem that I encountered is that it's easy for me to make mistakes when writing loop functions in Formula language.

Related resources from SearchDomino.com:
A Formula language for Lotus Notes introduction -- 7 tips in 7 minutes

Using Formula language code to sort Lotus Notes messages by subject

The LotusScript equivalent for @Unique -- ArrayUnique -- can be case insensitive. I needed a formula that would do this for a computed field on a Lotus Notes form.

The function loops through the elements of one list, comparing them to the elements in the second, using the @Compare function, with the "CaseInsensitive" switch.

Case-insensitive version of @Unique
(Click on code for enlarged view and script download.)

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Patrick Kenney. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes/Domino technical tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

This was last published in March 2009

Dig Deeper on Lotus Notes Domino Formula Language

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close