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

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury