You know how I recently wrote about a little but great Calc Manager feature hidden in plain sight? Well, what do you know, I was recently discussing some EPBCS calculation performance with my good friend Essbase Down Under, and he showed me yet another one. I’ve since shared this with a couple people that didn’t know about it either, so I thought I’d write about it!
So, it’s this little button: Format Code. And it’s staring at you right in the middle of the screen.
You start with a business rule that looks, well, not great. This is especially good for really big rules that have gotten out of control. Maybe code maintained by multiple developers over time, with different editing styles?
Here’s a small example: weird spaces in many places, misaligned indentation, the works.
And then you click the button with the angle brackets, Format Code. Indentation is automatically fixed. Weird spaces: gone. Notice that your comments have moved around a little, but not the ones at the top, which I appreciate. The only thing I don’t like is that now everything looks a little compressed. And also, if you have a really long FIX (not shown), it all becomes one line, forcing you to scroll right and left. I prefer my whole code to fit on the screen.
But now that you have a starting point, you can tweak spacing to your liking by hand. I like a little bit more breathing room, which I’ve added below. Just don’t click the button again or you’ll go back to the previous step (not fun in a really long BR!).
And there you have it folks, short and sweet. Hope it’s useful!