Exploring TM1 - a Chartertech Company
Close this search box.

Indenting TI Processes and Rules in TM1

Often when we write rules or TI’s it is tempting to just get it written and worry about making it readable another time. If you can indent your code as you write, then it is done and will be much easier to read subsequently. It is always good practice when creating a Turbo Integrator (TI) process or a Rule in TM1, to lay it out so that you indent the contents of commands like IF.

To do this simply in Architect, just use a couple of spaces or “Control I” and you get tabbed in one space. Do it again for two tabs. Unfortunately, it does not create a hanging indent, but it’s a whole lot better than spaces!

Example of Indenting

What is easier to read? This:

['Plan',{'In Stock','On Order', 'Commissioned', 'Committed'}] = N:IF (  NUMBR (!Year) < NUMBR ( DB ('System Settings', 'Current Year', 'String') ),['Actual'], ,Continue )); 

Or this:

['Plan',{'In Stock','On Order', 'Commissioned', 'Committed'}] = N:

  IF (  NUMBR (!Year) < NUMBR ( DB ('System Settings', 'Current Year', 'String') )


    ,Continue )


I know which I would prefer to read – and the example is a simple rule. Imagine if it was a more complex rule!

  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Log In