PricingBlog

Formula Boolean Not Working

  • corbin.harder_ppb-1468660416602443868

    Corbin Harder

    9 days ago

    I am using a formula to create a boolean value. When I reference that formula the value looks correct but is not recognized. For example, in the attached screenshot it indicates that the "false" is present in the attribute, but it is functioning like it is. When I manually input "false" instead of using the formula it works. This is just one example. It seems to be a problem everywhere I try to reference the formula boolean value. Thank you for any insight you might have!
    1468660416853840075-Screenshot_2026-02-04_092625.png
  • max.kayr-1468664373718417681

    Max

    9 days ago

    Hey! I am not entirely sure I understand your issue. The values in the screenshot look correct. What is not working?
  • corbin.harder_ppb-1468673262794969394

    Corbin Harder

    9 days ago

    Heyo! Yes, the values do indeed look correct, which is the confusing part. The value is false as it should be, but it is still not working like it should. If I type false into that field instead of using the formula then it works, but not when I use the is_editor formula.
  • lucasg-1468687312471724104

    Lucas G

    9 days ago

    Are you able to record a small demo of the actual issue then?
  • corbin.harder_ppb-1468690418366419064

    Corbin Harder

    9 days ago

    Sure thing! Hopefully this helps.
  • corbin.harder_ppb-1468690743156539628

    Corbin Harder

    9 days ago

    For some more context the is_editor formula is parsing the current url and looking for the 'editor' subdomain. This way I can separate functionality inside and outside the editor
  • lucasg-1468692798311108742

    Lucas G

    9 days ago

    What may be happening is that the formula is checking for a domain in the preview app which is in the iframe, not the editor window itself
    💪1
  • Hope that makes sense
  • corbin.harder_ppb-1468722786615951472

    Corbin Harder

    9 days ago

    That does make sense, but why would the formula both indicate that it is checking the editor URL and it says true? Thank you so much for the help.
    1468722786758561854-Screenshot_2026-02-04_133823.png
  • max.kayr-1468883305830023266

    Max

    9 days ago

    That is misleading, unfortunately, and I believe that the team is aware and has plans to change that in the future. The formula you see is evaluated in the context of the editor. And therefore, the URL is editor.nordcraft.com... But when the formula is actually evaluated in your app, the URL will never be editor.nordcraft.com..., but yoursite.toddle.site or a custom domain. So it will always be false. One way to check if you are in the editor is if you check whether you are running in an iframe. You could have a custom formula with return window.self !== window.parent. But be aware that if your live site is running in an iframe, this also evaluates to true, then.

    Hope this makes sense 🙂
  • corbin.harder_ppb-1469009620998557737

    Corbin Harder

    8 days ago

    That does make sense! Thank you very much for your insight 🙂
    💪1