Google Chrome Extension to make long formulas easier to read

Hi everyone,

 

I created the chrome extension Anaplan Formulator to make long formulas easier to read in the native formula editor. The extension inserts a return before and after each IF, THEN, and ELSE in the formula. Please take a look and let me know what you think!

 

Thanks,

Ryan

Answers

  • Just added and will be giving it a try! Did you create it? Any plans/thoughts on adding more functionality to it?

  • Hey there,

     

    Thanks for sharing! I've also just added this extension, will take a look.

    I'm used to copy-paste formula from a drilldown view to sublime text with C syntax. It helps with some complicated formulas.

    Capture.PNG

    Regards,

    Hayk

  • Hi @bdeaton, thank you for trying it out! I am the author. As of right now these are my goals for this project:

     

    Short term - Create a GitHub page and publish as open source. I have high hopes for this project and believe the best way to see them come to fruition is to publish as free and open source. 

     

    Long term - Adding indentation functionality to make code look pretty. This feels like the next logical step in the extensions life. 

     

    Extremely long term - Fully functioning code editor. This would be really cool...lets see what happens. 

     

    Let me know if there is anything you would like added to the extension!

     

    Thanks,

    Ryan

  • Wow I didn't even know this existed. Will definitely check it out, Thanks!

  • Just remember

     

    "you should be able to explain the formula in a simple sentence"

    "the formula should not take more space than the formula editor box"

     

    If either of these is not true, then the formula is too big and should be broken up!!!

    https://community.anaplan.com/t5/Knowledge/Formula-Structure-for-Performance/ta-p/33177

     

    "simple is better than complex"

     

    David

  • Thanks Ryan! Will definitely check this out.
  • I don't disagree!

     

    I do think that anything that helps build better formula and understand existing formulas is welcome.  Certainly the latter; where we are trying to simplify and optimise

     

  • @RyanMonique  I've been using the add-in all day today. It's awesome!

  • Great idea! A minor piece of feedback - I have modules names and list items that are being broken up because they contain "if". For example, I have the word "specific" in one of my module names. Maybe a condition in the code to only indent when a space exists before and/or after the keyword?

  • Hi @BenHilgendorf ,

     

    Thanks for the feedback and nice catch! I will infidelity take this feedback and add it to my testing routines for future releases. 

     

    This was a quick fix and V1.1 of the extension was just published. It searches for "IF ", " THEN ",or " ELSE ". The IF cannot have a space before as some formulas start "IF...." , but the space after should have the same effect as your solution. 

     

    Thanks,

    Ryan 

  • @bdeaton, Ah that's great to hear! Please feel free to spread word to any colleagues who may be able to make use of the extension ':)'

  • @bdeaton, Ah that's great to hear! Please feel free to spread word to any colleagues who may be able to make use of the extension ":)"

  • Really cool, thanks!

  • Hi @RyanMonique 

     

    This is amazing! I can't believe I've only just come across this!

    Really helpful! 

    But it is also true if the formula is too long then it should be broken down as @DavidSmith says! But the compromise that needs to be made is the sparsity! 

    However as model builders we need the tools for efficiency! 

     

    Thanks,

     

    Usman