Question on formulas

  • ssssadsadasd-1327907091431686187

    ssssadsadasd

    27 days ago

    I have a questions on formulas.

    Suppose I have an app formula that outputs a text. Now, in a component/page I need the result of the app formula in several places. So, I would not want to call the app formula in every place but just get the output in one place and refer to it. My solution is to build a component formula, use the app formula there, and get the result. The formula has an two variables as inputs.

    I dont know whether what I am doing makes sense, i.e. whether is is the same thing as calling the app formula.

    anyone has any idea how to solve this? thanks
    1
  • andreasmoller-1327907763417776200

    Andreas Møller

    27 days ago

    If you just need to share the logic (and no variables, API etc) the use a global formula.
  • If you also need to share data the. You can create a formula at a component higher up in the tree and share it through context
  • ssssadsadasd-1327908723712331879

    ssssadsadasd

    27 days ago

    @Andreas Møller it is simply an email validation and it returns a text (e.g. email does not contain upper case letter, or empty if it is correct).
    I need this for the styling of the label, showing the message, etc. so I would ideally check it once and not run the formula everywhere I need it.

    so you suggest to simply use a global formula and run it everywhere where it is needed? thanks
  • andreasmoller-1327936956532916278

    Andreas Møller

    27 days ago

    👍

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.