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

GeorgeDuckett
Regular Contributor

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

Hello all!

I have made a Google Chrome and Firefox extension that enhances Anaplan formula editing by using the Monaco editor. 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. It also works with the current/old formula editing experience; it's best in the new experience though.

Chrome: https://chrome.google.com/webstore/detail/better-formula-editor-for/lonibgccfehnjjhchfcbdhkaajhobeak
Firefox: https://addons.mozilla.org/en-GB/firefox/addon/better-formula-editor-anaplan/
Edge: https://microsoftedge.microsoft.com/addons/detail/better-formula-editor-for/dkeigmhhjolcnnanpachagca...
(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 to get 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.
  • 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.

The extension is under active development; currently next on the list is intelligent autocomplete suggestions for lookups required when referencing line items with different dimensions. Something like suggesting "LOOKUP: PROP C10 ItemCustomer.P6 Item" when pressing "[" after a relevant line item.

EDIT: The above is now in this extension. 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.

 

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.

45 REPLIES 45
GeorgeDuckett
Regular Contributor

Thanks, hope it helps!
GeorgeDuckett
Regular Contributor

I've added a new feature, QuickFixesWhen 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.

johnabooth
New Contributor

Good day George, I see you have an option to donate for Open Source projects.  Is your extension open source and if so may we see the repository URL?

Kind Regards,

John A. Booth

johnabooth
New Contributor
chilled0ut
Contributor

This is awesome! Been using and promoting it to the rest of our company. One thing that would be really great is if it can detect data type issues when you are passing a parameter to a function such as lookup or sum. You know how Anaplan takes a long time to tell you when you've entered an incorrect data type when calling a lookup or sum function. It would greatly improve productivity if the add-on can provide an advance warning (e.g. like highlight parameter in bright red background) when a model builder has passed the wrong data type as parameter to the function. 

GeorgeDuckett
Regular Contributor

I assume you mean stopping you doing a SUM on a boolean etc. Great idea. I do currently check parameters for bracket functions and LOOKUP, but could also make sure SUM and other aggregate functions. If you've found a case I've missed, please let me know.