Pricing Blog

formula undefined/null not equal to null

  • danishnizzle-1273684981708755014

    danishnizzle

    1 year ago

    I don't understand why this is evaluating to true
    1273684982392684686-image.png
  • lucasg-1273691350700658798

    Lucas G

    1 year ago

    null == undefined evaluates as true because they are loosely equal. null === undefined evaluates as false because they are not, in fact, equal.
  • In this case, try using a Default to node after your API
  • And set it to default to null
  • That should do it
  • danishnizzle-1273693014518267904

    danishnizzle

    1 year ago

    ty @Lucas G -- i just assumed that since the 1st value was appearing as Null in the UI toddle was doing some sort of data type transformation for me, your suggestion works 🙂
  • lucasg-1273693134089617439

    Lucas G

    1 year ago

    Yeah this is a tricky one sometimes
  • Same thing can occur with attributes
  • danishnizzle-1273694172427321398

    danishnizzle

    1 year ago

    I kind of like the idea of being able to set fallbacks directly ont he inputs, sorta like this -- these formulas get unwieldy sometimes
    1273694171928203375-image.png
  • danishnizzle-1273694562174631966

    danishnizzle

    1 year ago

    1273694561973047479-image.png