PricingDocsAcademy
Bluesky ...
Fri, Dec 13, 9:20 AM

Simplifying Formulas

  • /attachments/1306184041447424020/1306184041774452797/image.png

    benjabievres

    1 month ago

    Hello, I want to do a Formula that checks the value of a variable and returns true or false, for an Array Filter.

    Users have a select box where they can select: on, off, all

    - when it's 'all" => always "true"
    - when it's 'on' => item.active=true => "true", item.active=false => "false"
    - when it's 'off' => item.active=false => "true", item.active=true => "false"

    I built the formula you can see on the screenshot, but I wanted to know if I could have done simpler.

    Can you please help me?

    Thanks

    Benjamin
    image.png
  • /attachments/1306184041447424020/1306197241572233236/CleanShot_2024-11-13_at_10.00.312x.png

    MartinF

    29 days ago

    You can create an object with key-value pairs, this can simplify a little.
    CleanShot_2024-11-13_at_10.00.312x.png
    😍1
  • Not sure if that helps any
  • benjabievres

    29 days ago

    @MartinF I really love this idea!!
    πŸ‘1
  • benjabievres

    29 days ago

    Hey! I also created Custom Formulas to make the main formula simpler.
  • MartinF

    27 days ago

    Awesome, sounds nice and clean.

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code β€” but accessible to your entire team!

Try toddle β€” it's free!

Β© Copyright 2024 toddle. All rights reserved.