PricingBlog

Equals "x" or "y" formula editor roadblock

  • miles1991-1283728367140605972

    Miles

    1 year ago

    Hi 👋 ,

    Please see the image. I feel like I've duplicated some logic uneccessarily here. Is there a way to get the URL once, parse it, get the path and then say Equals "user" || "company"? Rather than writing it out twice like I have here? It seems inefficient how I have this currently set up.

    TIA 😀
    1283728367345995796-image.png
  • tomthebigtree-1283729061830594713

    Tom Ireland

    1 year ago

    You could create a formula to do most of the heavy lifting and use formula inputs to specify dynamic values. Then, where needed, you just use that single formula and pass it the inputs e.g. when setting a variable, etc.
  • miles1991-1283730246423547978

    Miles

    1 year ago

    I'm not sure I follow sorry. I don't need dynamic values here. I'll provide more context. If this logic is true, it will go to /.toddle/logout. So I don't need to pass any forumla inputs. What I am asking is that I have 2x Current URL blocks, 2x Parse URL blocks, 4x Get blocks, and 2x Equals blocks. My question is should I not somehow just have 1 of each (apart from 2 Get blocks) and be able to say Equals "user" || "company" ?? rather than starting again for each value I want to check against?
  • tomthebigtree-1283730954493362247

    Tom Ireland

    1 year ago

    One moment, I'll demo...
    😃1
  • tomthebigtree-1283733671915950143

    Tom Ireland

    1 year ago

    2 mins and I'll have an unlisted YT video for you. 😉
  • miles1991-1283733781509050390

    Miles

    1 year ago

    Amazing. Thanks @Tom Ireland 🙏
    👍1
  • tomthebigtree-1283735361947701248

    Tom Ireland

    1 year ago

  • Let me know if that helps.
    🔥2
  • miles1991-1283737047143678037

    Miles

    1 year ago

    That's amazing! Appreciate the help 🙂
  • tomthebigtree-1283737277020901418

    Tom Ireland

    1 year ago

    No problem! Might give you some inspiration for other scenarios. You can get pretty creative and I probably haven't even scratched the surface of what's possible myself. 👍
  • tomthebigtree-1283737545045442644

    Tom Ireland

    1 year ago

    You can also couple this with reusable workflows as well, which makes things a lot simpler and more powerful.
    👍1