alias https://bihints.com/ en TM1 lint https://bihints.com/tm1-lint <span class="field field--name-title field--type-string field--label-hidden">TM1 lint</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a href="/sites/default/files/alias.pl">alias.pl</a> is a very basic <a class="ui-en_wikipedia_org" href="https://en.wikipedia.org/wiki/Lint_(software)">lint</a> tool whose task is to flag "dangerous" TM1 rules.<br /> For now it is only checking for aliases in rules.</p> <p>Indeed, if an alias is changed or deleted, any rule based on that alias will stop working without any warning from the system. The values will remain in place until the cube or its rules gets reloaded but you will only get a "silent" warning in the messages log after reloading the cube.</p> <p>How to proceed:<br /> .configure and execute the following TI process (to put in prolog), this will generate a list of all cubes and associated dimensions, and a dictionary of all aliases on the system in .csv format</p> <pre> ### PROLOG #configure the 2 lines below for your system report = 'D:\alias.dictionary.csv'; report1 = 'D:\cubes.csv'; # ############################################## #it is assumed that none of the aliases contain commas DataSourceASCIIQuoteCharacter = ''; ######create a list of all cubes and associated dimensions c = 1; while(c &lt;= DimSiz('}Cubes')); cube = DIMNM('}Cubes',c); d = 1; while(tabdim(cube,d) @&lt;&gt; ''); asciioutput(report1, cube, tabdim(cube, d)); d = d + 1; end; c = c + 1; end; ######create a dictionary of all aliases d = 1; while(d &lt;= DimSiz('}Dimensions')); dim = DIMNM('}Dimensions',d); #skip control dimensions If(SUBST(dim,1,1) @&lt;&gt; '}'); attributes = '}ElementAttributes_' | dim; #any aliases? If(DIMIX('}Dimensions',attributes) &lt;&gt; 0); a = 1; while(a &lt;= DimSiz(attributes)); attr = DIMNM(attributes,a); #is it an alias? If(DTYPE(attributes,attr) @= 'AA'); #go through all elements and report the ones different from the principal name e = 1; while(e &lt;= DimSiz(dim)); element = DIMNM(dim,e); If(element @&lt;&gt; ATTRS(dim,element,attr) &amp; ATTRS(dim,element,attr) @&lt;&gt; ''); asciioutput(report,dim,attr,ATTRS(dim,element,attr)); Endif; e = e + 1; end; Endif; a = a + 1; end; Endif; Endif; d = d + 1; end; </pre> <p>.configure and execute the perl script attached below<br /> that script will load the csv files generated earlier in hash tables, scan all rules files and finally report any aliases.</p> <p>If the element is ambiguous because it is present in 2 different dimensions then you should write it as <strong>dimension:'element'</strong> instead of using aliases (e.g. write Account:'71010' instead of '71010').</p> <p>related: <a href="https://web.archive.org/web/20120710041215/http://users.skynet.be/fa436118/wim/tm1ruleareadefinition.htm">Wim Gielis' rule area definition tool</a></p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/user/14" typeof="schema:Person" property="schema:name" datatype="">admin</span></span> <span class="field field--name-created field--type-created field--label-hidden">Tue, 2010-09-07 13:12</span> <div class="field field--name-field-categories field--type-entity-reference field--label-inline clearfix"> <div class="field__label">Categories</div> <div class="field__items"> <div class="field__item"><a href="/tm1/developers" hreflang="en">developers</a></div> <div class="field__item"><a href="/tm1/alias" hreflang="en">alias</a></div> <div class="field__item"><a href="/tm1/rules" hreflang="en">rules</a></div> </div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=25&amp;2=comment&amp;3=comment" token="zIcYfyx9x2R_eMpsZ9_uvNrYo5LC9hJAkmbrmdnOI5c"></drupal-render-placeholder> </section> Tue, 07 Sep 2010 11:12:59 +0000 admin 25 at https://bihints.com Renaming elements https://bihints.com/renaming-elements <span class="field field--name-title field--type-string field--label-hidden">Renaming elements</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Renaming elements without activating aliases? Yes we can!<br /> The dimension editor and dimension worksheets cannot rename elements directly, so let me introduce you to <strong>SwapAliasWithPrincipalName</strong>.</p> <p><span><span><span>In this example, we will add a padding </span></span></span><span><span><span><span> "</span>0" to an existing set of elements without rebuilding the dimension from scratch. </span> </span> </span></p> <p>Before swap:</p> <p><img alt="Swap Aliases preview" data-entity-type="file" data-entity-uuid="db83941f-d5d8-4044-816c-fde54173acf5" src="/sites/default/files/inline-images/swap-elements-preview.jpg" /></p> <ul><li>Create a new alias "new" in the Dimension, by default the new elements are identical</li> <li>Change all required elements to their new names in that alias. Below we pad a zero in front of all elements</li> </ul><p><img alt="Swap Aliases Dimension new alias" data-entity-type="file" data-entity-uuid="8af11ef8-bf55-4c16-b8c4-f992a744da9b" src="/sites/default/files/inline-images/swap-aliases-dimension-new.jpg" /></p> <p>Now create a new TI with the following line in the Prolog Tab:</p> <pre> SwapAliasWithPrincipalName(Dimension,'new',0);</pre> <p>The third parameter needs to be zero to execute the swap. If you know if it has any purpose, please leave a comment to enlighten us.</p> <p>After swap:</p> <p><img alt="Swap Aliases result" data-entity-type="file" data-entity-uuid="30c87e5a-9a9e-4858-a3ad-2293b859cd12" src="/sites/default/files/inline-images/swap-aliases-after-preview.jpg" /></p> <p>And the "old" elements have become the "new" alias:</p> <p><img alt="Swap Alias with Principal Name" data-entity-type="file" data-entity-uuid="0cb72028-ae1a-4dcc-b83a-fd6e618a8e95" src="/sites/default/files/inline-images/swap-aliases-with-principal-name.jpg" /></p> <p><strong>/!\Make sure the associated dimension worksheet is also updated if there is one!!!</strong></p> <p>This was tested successfully under v. 9.0.3 and v. 9.4.<br /> This TI function is listed in the TM1 documentation, however there is no description of its function and syntax.</p> <p>Click on the <a href="tm1/rtfm_fail">RTFM FAIL</a> tag to find out some other poorly documented or simply undocumented TM1 functions.</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/user/14" typeof="schema:Person" property="schema:name" datatype="">admin</span></span> <span class="field field--name-created field--type-created field--label-hidden">Thu, 2010-09-02 12:05</span> <div class="field field--name-field-categories field--type-entity-reference field--label-inline clearfix"> <div class="field__label">Categories</div> <div class="field__items"> <div class="field__item"><a href="/tm1/developers" hreflang="en">developers</a></div> <div class="field__item"><a href="/tm1/alias" hreflang="en">alias</a></div> <div class="field__item"><a href="/tm1/rtfm-fail" hreflang="en">RTFM FAIL</a></div> </div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=19&amp;2=comment&amp;3=comment" token="qxWv4qHZP5DVri8yNHVDOGyFO3855_xVgGs6v6Fkg1I"></drupal-render-placeholder> </section> Thu, 02 Sep 2010 10:05:27 +0000 admin 19 at https://bihints.com https://bihints.com/renaming-elements#comments