Add Syntax Highlighting

Add Syntax Highlighting

As a Model Builder, I would like to have "syntax highlighting" when I create my formulas in order to improve readability.

40 Comments
Certified Master Anaplanner

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.

Community Manager
 
Status changed to: Your support is needed
Community Boss
 
Status changed to: Considered for Future Roadmap
New Contributor

Look in attached picture for example showcasing the problem -> How it works in excel. Look for syntax within red circle.

Community Manager
 
Status changed to: Your support is needed
Certified Master Anaplanner Certified Master Anaplanner
Certified Master Anaplanner

Hi,

 

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:

 

https://community.anaplan.com/t5/Idea-Exchange/Alert-Model-Builders-of-Incorrect-Formulas-References...

 

A sort of formula builder that helps you structure a formula, analyze an existing large formula, and check the syntax would save a lot of time.

 

There are a few browser plug-ins circulating, to help with basic indentation of IF statements, which highlights the need for such a tool.

 

Thank you,

 

 

Master Anaplanner/Community Boss

Love this suggestion @Ari !

Master Anaplanner/Community Boss

We are looking at what we can do in this area!

Community Manager
 
Status changed to: Your support is needed
Certified Master Anaplanner

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... 

Certified Master Anaplanner

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.

Master Anaplanner/Community Boss

Can I just re-iterate that this plug-in is not officially supported

Regular Contributor
 
Status changed to: Under Investigation
Contributor

+1 for Python-style syntax.

Certified Master Anaplanner

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. 

Certified Master Anaplanner

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.

New Contributor

+1, such functionality would remove a lot of pain and improve efficiency

Dear @Rebecca , status of this idea was changed to "Considered for Future Roadmap" a year ago - is there any progress on a topic?

New Contributor

+1 to: such functionality would remove a lot of pain and improve efficiency

Cool features are always welcome especially when they are saving time.

Certified Master Anaplanner

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.

Certified Master Anaplanner

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.

Users Online
Currently online: 69 members 338 guests
Please welcome our newest community members: