Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Ideas ifnull / coalesce function in Omnis

  • ifnull / coalesce function in Omnis

    Posted by Giacomo Manzoli Manzoli on August 8, 2023 at 8:16 am
    Vote up
    Up
    5
    ::

    Hi,

    I do find myself to often write/read:

    Calculate <b>lVar</b> as pick(isnull(<b>lVar</b>),<b>lVar</b>,0)

    to give a default value to something that can be #NULL and sometime, when the names are long, the code gets harder to read.

    Having a function like the SQL ifnull(var, defaultValue) would make the code more readable and compact.

    Jason Gissing replied 1 week, 1 day ago 2 Members · 1 Reply
  • 1 Reply
  • Jason Gissing

    Administrator
    April 16, 2026 at 2:52 pm

    Hi Giacomo,

    Apologies for the delayed response. Thank you for your suggestion – we agree that this is a very useful feature.

    We now have new coalesce() and coalesceempty() functions, as of Studio 11.2.

Log in to reply.