Reg Exp
Web Design
Notes Client
@IfError Obsolete In Notes 7
For those of you that have not learned the new @-function @IfError introduced in Notes 6, I have good news - you don't have to worry about it. The function has been made obsolete in Notes 7. The function still works in Notes 7, but according to the Notes Designer Help, it is now obsolete. Apparently, the function didn't quite work as designed and it sounds like it would be a real pain to fix. What does this mean to developers currently using the function?

Well, first I'll need to explain (for those of you that don't already know) the purpose of the function. It was meant to run a statement and, if the statement causes an error, return either a null string or an alternative statement. Since an example would help, let's take a look at dynamically getting the values from a dialog list. You want to get a list of country names. Let's say in R5 you had this formula:

Lookup := @DbLookup(""; ""; "vwKeywords"; "Country"; 2);
@If(@IsError(Lookup); "ERROR GETTING COUNTRIES"; Lookup)

In Notes 6, you could shorten that function to this:

@IfError(@DbLookup(""; ""; "vwKeywords"; "Country"; 2); "ERROR GETTING COUNTRIES")

But what does that mean now that the function is obsolete? Basically, it's been converted back to the realm of other unsupported @-functions, like @GetMembers and others. Most (if not all) of these functions still work in Notes 7, but there's no guarantee they will continue to work in future releases. So you're better off changing (when you can) all those @IfError statements back into the two-step method that you had to do in Notes 5.

Please note - the instances of @IfError in our hints and tips have been updated. Please see the changes on these documents: