Manage Learn to apply best practices and optimize your operations.


This tip describes how to anti-alias views in a column.

How many times have you needed to hard code a translation of alias values in a view column? You know, @If (a="123"; "Apples"; a = "234" ; "Orages";...) If you are willing to add an additional field to your form then read on.

This code assumes a few things. First that an extra field is ok to add. Second, the values and their aliases are accessed via lookup, rather than hard coded into the field itself. (Second tab: "Enter choices (One per line)")

Let's make the first field a checkbox, just for fun. It's called "Program." Populate the choices with a lookup to a Profile doc or a Keyword doc. Done.

Now create another Computed field called "dispProgram." Place this code in the "Value", where "Program Code" is the title of a Keyword document...

 a := @DbLookup ( class : "NoCache" ; server : db ; view ; "Program Code"; col); b := @If(@IsError(a);"Error"; @Trim(a)); c := @Replace(Program; @Right(b;"|") ; @Left (b;"|")); c

What's happening here? @Replace is looking at the values in the checkbox field, then by using the same lookup value it is replacing what it finds on the right side of the "|" (pipe) with what is on the left side of the "|".

Use the dispProgram field in your view and no more hard coding, or anti-aliasing, in the column formula.

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




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