Better Formula Editor for Anaplan; A Chrome/Firefox/Edge Extension

GeorgeDuckett
edited May 2023 in Modeling

Hello all!

A while back I made a Google Chrome and Firefox extension that enhances Anaplan formula editing by using the Monaco editor (currently 700 users). This is the editor used by Anaplan's new modelling experience. My extension works with this new experience adding enhancements over and above what Anaplan have done.

Chrome:  https://chrome.google.com/webstore/detail/better-formula-editor-for/lonibgccfehnjjhchfcbdhkaajhobeak
Firefox: Better Formula Editor for Anaplan
Edge:  https://microsoftedge.microsoft.com/addons/detail/better-formula-editor-for/dkeigmhhjolcnnanpachagcaggjgmacl
(Once added be sure to reload any open anaplan tabs)

Details below:

  • Formula Validation: Various checks are performed on formulas including simple things like ensuring all entities are named / referenced correctly or ensuring the correct data types are used throughout the formula, through to things like checking for dimension miss-matches when referring to line items with different dimensions.
  • Formula Formatting: Provides basic formatting for valid formulas; breaking up IF...THEN....ELSE onto multiple lines with proper indentation.
  • Hover Information: You can hover your mouse over most elements of a formula to get contextual information, for example hovering over line items shows their dimensions and data type and hovering over function names shows information about that function.
  • Quick Fixes: When errors are encountered the extension will allow the user to choose an appropriate fix from a menu which when chosen would make the required changes to the formula automatically.
  • Code Completion: As you are typing the editor will offer auto-complete suggestions for things like line items within the current module, fully qualified line items within other modules, function names etc. As well as auto-completing the above pressing "[" on a line item with dimensions that the current line item doesn't have will prompt it to work out a reasonable suggestion (based on your usage on other formulas) and suggest those LOOKUP/Aggregations as autocompletes. Something like suggesting LOOKUP: PROP C10 ItemCustomer.P6 Item
  • Function Information: When completing functions with parentheses you get popup contextual information relating to the parameters of the function together with an explanation of both the function and the parameters.
  • Shortcuts: Standard Monaco editor shortcuts apply. Ctrl-Space; Open code completion. Ctrl-Shift-Space; Open function info (when within function parentheses). Shift-Alt-F for formatting.

Please let me know what you think; I'm very open to further ideas!

If you like my work you can support me here, via the GitHub sponsorship program.

Answers

  • Hi @GeorgeDuckett

    Good to see you coming up with the newer version. I have used your previous version before Anaplan upgraded its formula editor. It was really great. I am adding this extension and will share you my feedback after some days.

    Thanks!

    -Shubham