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
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 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.

Dig Deeper on Lotus Notes Domino Formula Language



  • iSeries tutorials'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 ...