@Formula debug time saver snippets

If you are working with applications that is using Forms directly in the client but especially on the Webb here is some handy tips how to avoid debugging your code for hours.

  1. Always use @iserror or [FailSilent] with @DBLookups
    @dblookup(“”:”recache”;@dbname;”test view”;”test value”;1;[FailSilent])
    or
    Ret:=@dblookup(“”:”recache”;@dbname;”test view”;”test value”;1)
    @if(@iserror(Ret);@return(“”);””);

    And you code continues
    or use
    Ret:=@dblookup(“”:”recache”;@dbname;”test view”;”test value”;1);
    validatedRet:=@if(@iserror(Ret);””;Ret);

    And your code continues
  2. @DBColumn doesn’t have fail silent so use the @iserror way instead
  3. When you are using @DocGetField(Document UNID;”FieldName”)
    if you are getting a document that has readers and authors fields always use
    Ret:=@if(@iserror(@DocGetField(UNID;FieldName));””;@DocGetField(UNID;FieldName));
    If you don’t use that your code will crash on the webb if you can’t access or the document you are getting data from is deleted


    Update 2025-08-20:
    Thanks Knud Erik Højslet for pointing out that @iferror is a deprecated command, the code above is updated. Also updated from nocache to recache pointed out by Vladislav Tatarincev.

  1. Hi, thank you for hint.

    I recommend use cache or recache in formulas.
    This is much faster than noache.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.