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.

48 REPLIES 48
Misbah
Moderator

@GeorgeDuckett 

 

That was my assumption as well that it should work on chrome no matter what the OS is but I don't think it is working for me.

 

Yes, I am trying it in formula editor of NUX

Misbah
Moderator

@GeorgeDuckett 

 

Worked now! Had to re launch chrome and re login anaplan.

Thanks,

Misbah
Miz Logix

GeorgeDuckett
Regular Contributor

@Misbah Ahh ok, good, glad you got it sorted. Yeah, since when navigating around Anaplan in the new modelling experience it keeps you on the same page after installing the extension you'd need to navigate somewhere else (like the log in screen) then back again, or reload the tab you're on. I'll add that to the initial post.

NatalyaOnek
New Contributor


@GeorgeDuckett wrote:

@M.Kierepka I've created a version of my extension for the Firefox Addin store, so you should be able to use that version. I was also able to keep support for the old modelling experience in the end even with Firefox's restrictions, although I'd still recommend the new one. I also added a version specific to Edge too for good measure.

The firefox addon page is here: https://addons.mozilla.org/en-GB/firefox/addon/vavada.net.ua/ 


hello, I don't see the setup page for Chrome. thanks. Useful extension!

 

GeorgeDuckett
Regular Contributor

Hi @NatalyaOnek, Sorry, not too sure what you mean by setup page. Once you install the chrome extension and reload any open Anaplan pages you have it should just work. There isn't any setup of the extension that needs to be done. There isn't any options page to configure either.

rodriguezramiro
Contributor

Hi George,

 

Thanks for sharing this extension with all the community! I've just downloaded it, so I was not able to use it a lot yet, but it looks really good!

 

Are you planning to add indentation for the IF THEN clauses?

 

Best regards,

 

Ramiro

GeorgeDuckett
Regular Contributor

Hi @rodriguezramiro, thanks for the interest!

Yeah, it does do formula formatting / IF..THEN indentation. It's available via a right-click menu or using the shortcut Shift-Alt-F. I know it's something on Anaplan's list to be included as standard but I got fed up waiting so added it myself for now.

rodriguezramiro
Contributor

Thanks for your quick answer!

 

I was not able to find any right click menu, but it works with the shortcut. Nevertheless, when I edit an existing formula and activate the indentation, all references to line items outside the module that I'm in are lost (I've attached 2 screenshots as an example). Is this only happening to me or is it a known issue?

GeorgeDuckett
Regular Contributor

The right-click menu is only available when editing the formula. You should be able to right-click anywhere within the formula window to get the context menu up.
I've replicated your issue and got a fix for version 1.2.2. I've published this, but they take a short amount of time to get loaded into the browsers' extension stores.
rodriguezramiro
Contributor

Thanks for trying to fix it so quickly. I've downloaded the latest version (it said it was published today), but now when I activate the "Format Document" functionality, it does nothing (no references to other modules are lost, but no indentation is shown). I've tried closing the browser and re-launching it, but I had the same result.