Thanks for the idea and screenshot. We are moving your idea to 'acknowledged'. We encourage the Community to provide addtional feedback and support for the idea.
I can't stress enough how important this would be to all model builders on the team. I would only like to point out that while the colorful highlighting is nice to have, the ability to add new line & indent while reading or editing the formula (similarly to how formulas are currently displayed when using Drill Down) would drastically improve readability by itself. This would be a huge quality of life improvement as going back to edit/read/understand/rewrite lengthy formulas would become much easier.
This is also on my personal wishlist. Something to be able to more easily read through nested IF statements, and other more complex formulas would be great. I also really want the indention that is shown in the screenshot. Here is my personal screenshot for what it's worth.
It will be helpful to have the arguments of a formula in a bubble (see the screenshot) while using that formula into the formula bar (much like in Excel). This will make understanding and learning easy.
Completely agree with the above. A lot of model builders come from a world familiar with MS Excel which is still dramatically better in the formula writing area than Anaplan is currently when it comes to ease of use.
I want to add another important enhancement to formula editor. For long formulas (1+ word pages) it is quite necessary to have in-text comments, as in other programming languages. So for example everything between $some symbols$ is ignored by system, but visible to modeler and thus helps with development and support.
Agreed! It would be helpful if the tab spacing was preserved.
As a workaround I made my own color mapping to use in Notepad++ . For larger complex builds, I do all my formula writing in Notepad++ then paste it into Anaplan so that way I have a library of line formulas to view and debug. If anyone is interested in the formatting file for Notepad++ I can send it.
I also use an external editor (Mac Vim) to get color coding; I just tell it the file is in the R language; I ought to build a custom file to improve how it looks, however, because right now it is very rudimentary and dependent on the use of quotes. If you could upload the Notepad++ color settings (in some form), I am sure Windows model builders would appreciate it.
PS. In a module, /data/drill down will format a formula with white space including line breaks for easier readability -- but all black and white.
Doesn't seem to be a file upload function on community. If anyone wants to load it, paste this code into Notepad and save the file with an .xml extension. You can then import this as a user defined language in Notepad++.
Aside from coloring, another thing I really like about Notepad++ is the ability to set up parenthesis color matching. When I put my cursor next to a parenthesis it'll highlight the matching open and close. This is super handy when I have gnarly nested IF functions or many logical arguments in a formula. If Anaplan has syntax highlighting in the works please include this feature!
When editing a formula, if you click the drop down/pivot double area have the formula display with indents for if-then-else statements, row numbers, and coloring (if possible allow adding in comments).
Making clear what is a key word, what is a module, line item, when/where brackets/parenthesis begin and end, and auto-fill when you start typing out names of each piece (eg. I start typing Time, with a T and all the module names, lists, and key words start to populate as a list below that is click able)
When entering a formula or you have completed a formula and line items references by it are highlighted or shading in a conditional format when in the formula bar - similar to excel. This would really help when you have similarly named line items or really long formulae.
I believe this would be a very impactful tool for model builders and power users. The idea is to help write or verify a formula. In its most basic form, the tool would auto-indent formulas just like in an app like xcode:
IF
X = Y
AND
BooleanVariable
THEN
VariableX[
LOOKUP : LineItem
]
ELSE
VariableY[
SUM : LineItem
]
A little version of that is already available in the drill-down functionality. In fact, I tell clients to use the drill-down functionality to check their formulas. If only the basic indentation of the drill-down menu would appear when you re-open the formula input field, already this would be a big improvement. Then if colors are added, it would make it even better. I suspect, doing this may require a level of syntax check as you enter the formula. This would go hand in hand with several other requests to check the syntax before submitting a formula, one of which is already on the roadmap:
There is a third-party chrome plugin available made by a french consulting company. I fully agree that this should be incorporated into the platform but untill that is the case the chrome plugin really works for me. It includes indentation and color coding and even fills your formulas (when you start typing). You can find it on: https://chrome.google.com/webstore/detail/a%20-for-anaplan-model-buil/najhicgfojolaebaoccdbopmobcdhp...
There are some tools that exist that work pretty well, but aren't automatically updated (need to maintain formulas, etc), but I agree this would a massive value add for model builders.
Considering Anaplan is formulated in English to an extent, having a similar approach to Python syntax and linting would be the best, in my opinion. Use tabs for nested functions, highlighting, and checking for completed parenthesis, etc.
There is a Chrome add-in called "A+ for Anaplan (Model Builder Edition)" that has worked for me pretty well over the past couple months in accomplishing some of these request. I would check it out. It does nested If/then statements; color codes items; and allows you to search for line items and names when typing out a formula. One thing to note: It only works when your formula bar is locked to the left side of the screen.
I hesitate to share because as it is maintained by a 3rd party and not Anaplan, I don't want this removed from the roadmap as the 3rd party could stop supporting the add-in whenever they feel like it.
As for Chrome extensions we cannot use them unless they are maintained by Anaplan company or another secure developer, as we found out they have access to models meta-data. So please keep built-in highlighting on the roadmap.
I too use the A+ for Anaplan (Model Builder Edition) extension for Chrome. I have found it to be incredibly helpful for long and complex formulas (especially for IF statements). I have also found it valuable particularly useful when teaching new Anaplan users the syntax used within Anaplan.
The extension is useful, but would be great to have this included natively for a more seamless experience specifically around highlighting which variable of the function you should be entering as you go.
As I remember the Chrome extention was not approved by Anaplan company. Once we found the extention too, but discovered it can send the meta data of the models somewhere. So it is not secure and not a valid workaround.
This would be a fantastic update to the platform. In the meantime, there are chrome add-ons you can leverage like A+ for Anaplan and Anaplan Formula Helper. They can be a little wonky at first, but once you get the hang of them it makes auditing long complex formulas much more manageable.
The New Modeling Experience launched recently includes our first iteration of syntax highlighting. We hope to be able to add auto-indentation capabilities in a future version.