0% found this document useful (0 votes)
317 views22 pages

TM1 - Turbo Integrator Fuctions

The document describes various functions for manipulating dimensions and cubes in TM1. It provides the syntax and examples of using each function, including functions for creating, deleting, and editing dimensions and dimension elements, as well as functions for creating, clearing, and unloading cubes.

Uploaded by

somojyoti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
317 views22 pages

TM1 - Turbo Integrator Fuctions

The document describes various functions for manipulating dimensions and cubes in TM1. It provides the syntax and examples of using each function, including functions for creating, deleting, and editing dimensions and dimension elements, as well as functions for creating, clearing, and unloading cubes.

Uploaded by

somojyoti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Reserve Words:

o break
o else
o elseif
o end
o endif
o if
o while

Dimension Manipulation
1. DimensionCreate:

Syntax: DimensionCreate(DimName);

Exp: DimensionCreate(’Product’);

For creating new dimension.

2. DimensionDestroy

Syntax: DimensionDestroy(DimName);

Exp: DimensionDestroy(’Product’);

To delete a dimension from database.

3. DimensionDeleteAllElements

Syntax: DimensionDeleteAllElements (DimName);

Exp: DimensionDeleteAllElements (’Product’);

Deletes all the elements in a dimension and is useful for recreating dimension hierarchies.

4. DimensionElementInsert

Syntax: DimensionElementInsert(DimName, InsertionPoint, ElName,ElType);


Exp: DimensionElementInsert(’Products’, ’Book’, ’Newspaper’,’N’);

Adds the element 'Newspaper' into 'Products' dimension just before the element 'Book' of type numeric

DimensionElementInsert('Products', '', 'Halogen Light', 'N');

This will add the new element 'Halogen Light' of type numeric to the end of the list.

5. DimensionElementInsertDirect

Syntax: DimensionElementInsertDirect(DimName, InsertionPoint, ElName,ElType);


Exp: DimensionElementInsertDirect(’Products’, 'ELCB', ’Helmet’,’N’);
adds an element to a dimension by directly editing the dimension .

Direct edits are different in that no editing copy is involved. Instead, the operations are performed directly on the
actual dimension. There are two different, specialized use cases for which this type of direct editing is intended:

> When the purpose of the TurboIntegrator process is to make a small change to a large dimension. In this case,
direct editing will be more efficient because it avoids copying and completely rewriting the large dimension.

> When the purpose of the TurboIntegrator process is to load large volumes of data into a cube. In this case the
process' Metadata procedure is deliberately kept empty, and any element insertion needed to support data loading is
performed using direct calls in the Data procedure. When the Metadata procedure is empty, the process skips an
entire iteration over the external datasource, which can result in faster data loads.

6. DimensionElementDelete

Syntax: DimensionElementDelete(DimName, ElName);

Exp: DimensionElementDelete(’Products’, ’Notebook’,);

This deletes the element ’Notebook' from the Products dimension.

7. DimensionElementDeleteDirect

Syntax: DimensionElementDeleteDirect(DimName, ElName);

Exp: DimensionElementDeleteDirect(’Products’, ’Notebook’,);

Deletes an element from a dimension by directly editing the dimension.

TurboIntegrator supports whole-copy editing automatically whenever dimension editing


TurboIntegrator functions (like DimensionElementDelete) are used in the Metadata procedure of
the process.
TurboIntegrator automatically creates the editing copy and applies editing operations to it, then
rewrites the actual dimension at the end of the Metadata procedure.

8. DimensionElementComponentAdd

Syntax: DimensionElementComponentAdd(DimName, ConsolidatedElName,ElName, ElWeight);

Exp: DimensionElementComponentAdd(’Product’, Book’, ’Datawarehouse’, -1);

Adds a component (child) to a consolidated element.

9. DimensionElementComponentAddDirect

Syntax: DimensionElementComponentAddDirect(DimName, ConsolidatedElName,ElName, ElWeight);

Exp: DimensionElementComponentAddDirect(’Product’, Book’, ’Datawarehouse’, -1);

Adds a component (child) to a consolidated element by directly editing a dimension.


10. DimensionElementComponentDelete

Syntax: DimensionElementComponentDelete(DimName, ConsolidatedElName,ElName);

Exp: DimensionElementComponentDelete(’Product’, Book’, ’Datawarehouse’);

Deletes a component (child) from a consolidated element.

11. DimensionElementComponentDeleteDirect

Syntax: DimensionElementComponentDeleteDirect(DimName, ConsolidatedElName,ElName);

Exp: DimensionElementComponentDeleteDirect(’Product’, Book’, ’Datawarehouse’);

Deletes a component (child) from a consolidated element by directly editing the dimension.

12. DimensionTopElementInsert

Syntax: DimensionTopElementInsert(DimName, InsertionPoint, ElName);

Exp: DimensionTopElementInsert(’Region’, ’Netherlands’, ’World’);

Creates a root element in a dimension. If the dimension already has a single root, then this element will
not be created.

13. DimensionTopElementInsertDirect

Syntax: DimensionTopElementInsertDirect(DimName, InsertionPoint, ElName);

Exp: DimensionTopElementInsertDirect(’Region’, ’Netherlands’, ’World’);

Creates a root element in a dimension by directly editing the dimension. If the dimension already has a
single root, then this element will not be created.

14. DimensionSortOrder

Syntax: DimensionSortOrder(DimName, CompSortType, CompSortSense,ElSortType , ElSortSense);

Exp: DimensionSortOrder (’Product’, ’ByName’, ’Descending’,’ByLevel’, ’Ascending’);

Sets a sort type and sense for dimension elements and for components of consolidated elements within
a dimension.

15. DimensionUpdateDirect

Syntax: DimensionUpdateDirect(DimName);
Exp: DimensionUpdateDirect(’Product’);

Performs a full rewrite of a dimension that has been subject to direct editing in a TurboIntegrator
process, essentially compacting the memory footprint of the dimension.

16. DimensionElementPrincipalName

Syntax: DimensionElementPrincipalName( DimName, ElName );

Exp: DimensionElementPrincipalName('Product', 'Read' );

Returns the principal name of an element or element alias.

17. DimensionExists

Syntax: DimensionExists(DimName);

Exp: DimensionExists(’Product’);

Determines if a specific dimension exists on the server from which a TurboIntegrator process is
executed. The function returns 1 if the dimension exists on the server, otherwise it returns 0.

18. DimensionHierarchyCreate

Syntax: DimensionHierarchyCreate(DimName, HierName);

Exp: DimensionHierarchyCreate (’Vehicle’, 'Car');

HierName = The name that you want to assign to the hierarchy. You cannot use the name of the
dimension.

creates the empty Car hierarchy in the Vehicle dimension.

19. DimensionTimeLastUpdated

Syntax: DimensionTimeLastUpdated(DimName);

Exp: DimensionTimeLastUpdated('Product');

Returns information on when the Region dimension was last updated.


Cube Manipulation TI Functions
1. CubeCreate

Syntax: CubeCreate(Cube, d1, d2 [,...dn]);


Exp: CubeCreate(’Profit_&_Loss’, ’Actvsbud’, ’Region’, ’Model’,’Account1’, ’Month’);

Creates a cube from specified dimensions. The order of dimensions specified in the function will be the
order of dimensions in the cube definition.

2. CubeDestroy

Syntax: CubeDestroy(Cube);

Exp: CubeDestroy('Product');

Deletes a specified TM1 cube.

3. CubeClearData

Syntax: CubeClearData(Cube);

Exp: CubeClearData('Product');

Clears all of the data in a cube.

This function is much faster than doing an operation such as creating a view to cover the entire
cube, and then doing a ViewZeroOut() to zero out the entire cube.
In CubeClearData to clear data from a cube, any cells in the cube that are fed with feeders are
also cleared. You must resave the rule that establishes the feeders or use the CubeProcessFeeders
function to restore the fed cells.

This call just deletes the cube data, it does not delete and re-create the cube itself. This has implications when
sandboxes are used. If a cube is deleted and then re-created any sandboxes a user may have will be discarded, since
the cube against which those sandboxes were created was deleted (even though a cube may have been re-created
with the same name). If however the CubeClearData() call is used, the sandbox data will still be considered valid,
since the cube against which the sandbox was created continues to exist.

4. CubeUnload

Syntax: CubeUnload(CubeName);

Exp: CubeUnload(’Product’);

Unloads a specified cube, along with all associated cube views, from memory. It only disconnects cube
from memory.
5. AddCubeDependency

Syntax: AddCubeDependency(BaseCube, DependentCube);


Most commonly, dependentcube would be a cube that uses rules to pull data from an external cube.

Exp: Consider a cube named 'SalesCube' that includes the rule ['net']=!Units * DB('PriceCube', ... );
In this example, 'SalesCube' is the dependent cube, as it is dependent on values in the base cube named
'PriceCube' to calculate the value of 'net'. To establish this dependency, you should run the following
function in a TurboIntegrator process: AddCubeDependency( 'PriceCube', 'SalesCube' );

AddCubeDependency lets you predefine cube inter-dependencies to avoid lock contention problems
during normal system use.
In normal operations, cube dependencies are established when data which crosses cube boundaries
(such as data that is derived by a rule that references an external cube) is retrieved. To create the
dependency information, the server must lock the cubes while the dependency is established,
potentially maintaining the lock during a long view calculation. Since this is a 'write' lock, other users are
prevented from accessing the cubes. The AddCubeDependency function allows the dependency to be
established when the server starts up, preventing later lock contention as no new dependency need be
established.

6. CubeExists

Syntax: CubeExists(CubeName);

Exp: CubeExists(’Product’);

Determines whether a specific cube exists on the server from which a TurboIntegrator process is
executed. The function returns 1 if the cube exists on the server, otherwise it returns 0.

7. CellGetN

Syntax: CellGetN(Cube, e1, e2 [,...en]);

Exp: CellGetN('Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Apr', 'Actual', 'Budget Version2');

Retrieves a value from a numeric cube cell.

8. CellPutN

Syntax: CellPutN(x,Cube, e1, e2 [,...en]);

Exp: CellPutN(24, 'Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Apr', 'Forecast', 'Budget
Version2');

Sends a numeric value to a cube cell.


9. CellGetS

Syntax: CellGetS(Cube, e1, e2 [,...en]);

Exp: CellGetS('Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Apr', 'Actual', 'Budget Version2');

Retrieves a value from a string cube cell.

10. CellPutS

Syntax: CellPutS(x,Cube, e1, e2 [,...en]);

Exp: CellPutS(478, 'Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Apr', 'Forecast', 'Budget
Version2');

Sends a string value to a cube cell.

11. CellIncrementN

Syntax: CellIncrementN(x, Cube, e1, e2 [,...en]);

Exp: CellIncrementN(24, 'Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Apr', 'Forecast',
'Budget Version2');

Increments an existing numeric cell value by a specified value.

12. CellPutProportionalSpread

Syntax: CellPutProportionalSpread(value, cube, e1, e2, e3...,en );

Exp: CellPutProportionalSpread(6000, 'Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Apr',


'Forecast', 'Budget Version2');

Distributes a specified value to the leaves of a consolidation proportional to existing cell values.
CellPutProportionalSpread replaces existing cell values; it cannot be used to add to or subtract from
existing cell values.

When using CellPutProportionalSpread to distribute a value to the leaves of a consolidation, only those
leaves already containing non-zero values are changed. This is because zero values cannot be
incremented or decremented proportionally; any proportion of zero is still zero.

13. CellIsUpdateable

Syntax: CellIsUpdateable(Cube, e1, e2 [,...en]);

Exp: CellIsUpdateable('Products2', 'Admin', 'HP machine1', 'Revenue', 'Salary', 'Q1', 'Actual', 'Budget
Version2'

Lets you determine if a cube cell can be written to. The function returns 1 if the cell can be written to,
otherwise it returns 0.
14. CubeSetLogChanges

Syntax: CubeSetLogChanges(CubeName, LogChanges);

LogChanges The Boolean value you want to assign to the property. 1= LOGGING on, 0 =
LOGGING off.

Exp: CubeSetLogChanges(’Products2’, 0 );

Sets the LOGGING property for a cube.

15. CubeGetLogChanges

Syntax: CubeGetLogChanges(CubeName);

Exp: CubeGetLogChanges(’Products2’);

Returns the Boolean value of the Logging property for a specified cube. If Logging is turned on for a
cube, the function returns 1. If logging is turned off the function returns 0.

16. CubeDimensionCountGet

Syntax: CubeDimensionCountGet(CubeName);

Exp: CubeDimensionCountGet('Products2');

Returns the number of dimensions in a cube.

17. CubeSaveData

Syntax: CubeSaveData(Cube);
Exp: CubeSaveData('Products2');

Serializes a cube.
SaveDataAll has been used to serialize data to disk and to truncate the transaction log. When processing
a SaveDataAll command, the server acquires a READ lock on every cube and an IX lock on every changed
cube. This can cause significant contention with user activity if SaveDataAll is run during periods of user
activity.

18. CubeSetConnParams

Syntax: CubeSetConnParams(cubeName, providerName, dataSourceLocation,dataSourceName,


dataSourceCatalog, userID, password,sapClientLang,providerString);
Exp: CubeSetConnParams(sc, TM1OLAP, tm1server, , sdata, admin,apple,, ,);

Used to encrypt the password for a virtual cube in the }CubeProperties cube.
19. CubeTimeLastUpdated(cube);

Syntax: CubeTimeLastUpdated(CubeName)
Exp: CubeTimeLastUpdated('Products2');

Returns a serial value that indicates the date and time at which a specified cube was last updated.

Subset Manipulation TI Functions

1. SubsetCreate

Syntax: SubsetCreate(DimName, SubName);

Exp: SubsetCreate('Product', 'Machine_Prod');

Creates an empty public subset of a specified dimension.

2. SubsetCreateByMDX

Syntax: SubsetCreatebyMDX(SubName, MDX_Expression, <AsTemporary>);

<AsTemporary> - This is an optional argument that specifies whether the subset that is being created is
temporary. 1 indicates a temporary subset. 0 indicates a permanent subset.
If this argument is omitted, the subset is permanent.

Exp: SubsetCreatebyMDX('Sorted 0-level product', '{TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL(


[Product] )}, 0)}, ASC)}', 1);

In 10.2.2 <AsTemporary> will not work.

Creates a public subset based on a passed MDX expression.

3. SubsetDeleteAllElements

Syntax: SubsetDeleteAllElements(DimName, SubsetName);

Exp: SubsetDeleteAllElements('Product', 'Machine_Prod');

Deletes all elements from a public subset.

4. SubsetDestroy

Syntax: SubsetDestroy(DimName, SubName);


Exp: SubsetDestroy('Product', 'Machine_Prod');

Deletes a subset from the TM1 database.

5. SubsetElementInsert

Syntax: SubsetElementInsert(DimName, SubName, ElName, Position);

Exp: SubsetElementInsert(’Product’, 'Newspaper’, ’Economic times’, 1);

Adds an element to an existing subset.

6. SubsetElementDelete

Syntax: SubsetElementDelete(DimName, SubName, Index);

Exp: SubsetElementDelete(’Product’, 'Newspaper’, 3);

Deletes an element to a subset.

7. SubsetExists

Syntax: SubsetExists(DimName, SubsetName);

Exp: SubsetExists(’Product’, 'Book’);

Use to determine if a specific public subset exists on the server from which a TurboIntegrator process is
executed. The function returns 1 if the subset exists on the server, otherwise it returns 0. Note that this
function cannot be used to determine the existence of private subsets.

8. SubsetAliasSet

Syntax: SubsetAliasSet( DimName, SubName, AliasName );

Exp: v2= SubsetAliasSet('Product', 'Newspaper', 'Alias');

Sets the alias attribute to be used in a subset. SubsetAliasSet returns 1 if successful, 0 otherwise. If there
is Alias for the dimension (even in case the Alias column has no values for the elements) then it will
return 1. If there is no Alias column, then error will come and outcome result is 0.

9. SubsetGetElementName

Syntax: SubsetGetElementName(DimName, SubsetName, ElementIndex);

Exp: SubsetGetElementName('Product', 'Newspaper', '3');

Returns the name of the element at a specified index location within a given subset.
10. SubsetGetSize

Syntax: SubsetGetSize(DimName, SubsetName);

Exp: SubsetGetSize('Product', 'Newspaper');

Returns the number of elements in a subset. Includes duplicate items also.

11. SubsetExpandAboveSet

Syntax: SubsetExpandAboveSet( DimName, SubsetName, ExpandAboveFlag);

Set ExpandAboveFlag to 1 to set the Expand Above property to TRUE. When this property is TRUE,
consolidations expand above on rows and to the left on columns.
Set ExpandAboveFlag to 0 to set the Expand Above property to FALSE. When this property is FALSE,
consolidations expand below on rows and to the right on columns.

Exp: SubsetExpandAboveSet('Product', 'Newspaper', 1);

Sets the Expand Above property for a subset. When this property is set to TRUE, children of a
consolidation are displayed above the consolidation when the consolidation displays on a row, and to
the left of the consolidation when the consolidation displays on a column. The function returns 1 if
successful, otherwise it returns 0.

12. SubsetFormatStyleSet

Syntax: SubsetFormatStyleSet( DimName, SubsetName, FormatName);

Exp: SubsetFormatStyleSet (’Region’, ’Northern Europe’, ’BoldCurrencyLeftJustified’);

Applies an existing display style to a named subset.

13. SubsetIsAllSet

Syntax: SubsetIsAllSet( DimName, SubName, Flag );

Exp: : SubsetIsAllSet ('Product', 'Newspaper', 1);

Sets a subset to use all elements of the parent dimension. It is equivalent to clicking the All button on
the Subset Editor. SubsetIsAllSet returns 1 if successful, 0 otherwise.

14. SubsetMDXGet

Syntax: SubsetMDXGet( DimName, SubName);

Exp: SubsetMDXGet('Product', 'Sorted 0-level product');

Retrieves the MDX expression used to create a subset.


15. SubsetMDXSet

Syntax: SubsetMDXSet( DimName, SubName, [MDX_Expression]);

Exp: SubsetMDXSet('Product', 'Sorted 0-level product', {TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL(


[Product] )}, 0)}, ASC)});

Optionally, the MDX expression that you want to populate the subset with. All elements are deleted and
the subset is populated with the elements as defined by the new MDX expression. If the MDX expression
is invalid, TurboIntegrator processing stops, the contents of the subset is unchanged and an error is
logged. If you do not use this parameter, include an empty string as shown in the example.

countMem = SubsetMDXSet('Cities', 'testsubset', '');

View Manipulation TI Functions

1. PublishView

Syntax: PublishView(Cube, View, PublishPrivateSubsets, OverwriteExistingView);

Exp:

PublishPrivateSubsets This Boolean argument (1 or 0) determines if any private subsets present


in the view should also be published.
If PublishPrivateSubsets is true (1) , all private subsets used in the view
are published along with the view.
If this argument is false (0) , private subsets are not published. A public
view cannot contain private subsets, so the view will not be published
and an error will be written to the TurboIntegrator log file.
NoteIf a private subset contains another private subset as a user-defined
consolidation, the subset can never be published using the PublishView
function, regardless of the value of the PublishPrivateSubsets argument.

OverwriteExistingView This Boolean argument (1 or 0) determines if any existing identically


named public view should be overwritten when the private view is
published.
If OverwriteExistingView is true (1) , any existing identically named
public view will be overwritten when the private view is published.
If this argument is false (0), the public view will not be overwritten, the
private view will not be published, and an error will be written to the
TurboIntegrator log file.
2. ViewConstruct

Synax: ViewConstruct(CubeName, ViewName);

Exp: ViewConstruct('Products2', 'View1');

Constructs, pre-calculates, and stores a target view in memory on a server.


Useful for pre-calculating and storing large views so they can be quickly accessed after a data load or
update.

3. ViewCreate

Synax: ViewCreate(CubeName, ViewName);

Exp: ViewCreate('Products2', 'View2');

Creates an empty view of a specified cube.

ViewCreate(Cube, ViewName, <AsTemporary>);

AsTemporary This is an optional argument that specifies whether the view being created is
temporary. 1 indicates a temporary view, 0 indicates a permanent view.
If this argument is omitted, the view is permanent.

4. ViewDestroy

Syntax: ViewDestroy(CubeName, ViewName);

Exp: ViewDestroy('Products2', 'View2');

Deletes a view from the TM1 database.

5. ViewZeroOut

Syntax: ViewZeroOut(CubeName, ViewName);

Exp: ViewZeroOut ('Products2', 'View2');

Sets all data points in a view to zero.

6. ViewExists

Syntax: ViewExists(CubeName, ViewName);

Exp: ViewExists('Products2', 'View2');


Determines if a specific public view exists on the server from which a TurboIntegrator process is
executed. The function returns 1 if the view exists on the server, otherwise it returns 0. This function
cannot be used to determine the existence of private views.

7. ViewColumnSuppressZeroesSet

Syntax: ViewColumnSuppressZeroesSet(CubeName, ViewName, Flag);

Flag A binary value that enables or suppresses zeroes. Specify 1 to suppress the display of
columns containing only zeroes in the view. Specify 0 to enable the display of columns
containing only zeroes.

Exp: ViewColumnSuppressZeroesSet ('Products2', 'View1', 1);

Suppresses or enables the display of columns containing only zero values in a TM1 cube view.

8. ViewRowSuppressZeroesSet

Syntax: ViewRowSuppressZeroesSet(CubeName, ViewName, Flag);

Flag A binary value that enables or suppresses zeroes. Specify 1 to suppress the display of rows
containing only zeroes in the view. Specify 0 to enable the display of rows containing only
zeroes.
Exp: ViewRowSuppressZeroesSet ('Products2', 'View1', 1);

Suppresses or enables the display of rows containing only zero values in a TM1 cube view.

9. ViewSuppressZeroesSet

Syntax: ViewSuppressZeroesSet(CubeName, ViewName, Flag);

Exp: ViewSuppressZeroesSet ('Products2', 'View1', 1);

Suppresses or enables the display of all rows and columns containing only zero values in a TM1 cube
view.

10. ViewExtractSkipCalcsSet

Syntax: ViewExtractSkipCalcsSet(CubeName, ViewName, Flag);

ViewExtractSkipCalcsSet (Cube, ViewName, Flag);


Argument Description
Cube The parent cube of the view for which you are setting the option.
Argument Description
ViewName The view for which you are setting the option.
Flag A binary value that turns the option on or off. Specify 1 to exclude consolidated
values from the view extract. Specify 0 to include consolidated values.

Sets an option to include/exclude consolidated values in a view extract. A view extract is a TM1 view
exported as an ASCII comma-delimited (.cma) file. ViewExtractSkipCalcsSet is the equivalent of the Skip
Consolidated Values option in the View Extract dialog box.
Exp:

ViewExtractSkipCalcsSet ('99sales', '1st Quarter Actuals',1);


This example turns on the Skip Consolidated Values option for the 1st Quarter Actuals view. The view
extract will not include any consolidated values.

11. ViewExtractSkipRuleValuesSet

Syntax: ViewExtractSkipRuleValuesSet(CubeName, ViewName, Flag);

Sets an option to include/exclude rule-calculated values in a view extract. ViewExtractSkipRuleValuesSet


is the equivalent of the Skip Rule Calculated Values option in the View Extract dialog box.

ViewExtractSkipRuleValuesSet is the equivalent of the Skip Rule Calculated Values option in the View
Extract dialog box.

ViewExtractSkipRuleValuesSet (Cube, ViewName, Flag);


Argument Description
Cube The parent cube of the view for which you are setting the option.
ViewName The view for which you are setting the option.
Flag A binary value that turns the option on or off. Specify 1 to exclude rule-calculated
values from the extract. Specify 0 to include rule-calculated values.
Exp:

ViewExtractSkipRuleValuesSet ('99sales', '1st QuarterActuals', 1);


This example turns on the Skip Rule Calculated Values option for the extract created from the 1st
Quarter Actuals view. The extract will not include any rule-calculated values.

12. ViewExtractSkipZeroesSet

Syntax: ViewExtractSkipZeroesSet(CubeName, ViewName, Flag);


Sets an option to include/exclude zero values in a view extract and is the equivalent of Skip Zero/Blank
Values option in the View Extract dialog box. Note that this function does not suppress the display of
zeroes in a view; it only excludes zeroes from a view extract.

ViewExtractSkipZeroesSet is the equivalent of the Skip Zero/Blank Values option in the View Extract
dialog box.

ViewExtractSkipZeroesSet (Cube, ViewName, Flag);


Argument Description
Cube The parent cube of the view for which you are setting the Skip Zeroes option.
ViewName The view for which you are setting the Skip Zeroes option.
Flag A binary value that turns the option on or off. Specify 1 to exclude zeroes from the
extract. Specify 0 to include zeros.
Exp:

ViewExtractSkipZeroesSet ('99sales', '1st Quarter Actuals',1);


This example turns on the Skip Zeroes option for the extract created from the 1st Quarter Actuals view.
The extract will not include any zero or blank values.

13. ViewExtractSkipConsolidatedStringsSet

Syntax: ViewExtractSkipConsolidatedStringsSet(CubeName, ViewName, Flag);

Exp:

sets an option to exclude strings on consolidated values that are excluded from a view or any associated
view extracts. A view extract is a TM1® view exported as an ASCII comma-delimited (.cma) file.
TM1 allows the storing of strings on calculated values. When you exclude a calculated value from a view
or view extract you may want to exclude the message string also from the view.

14. ViewSubsetAssign

Syntax: ViewSubsetAssign(CubeName, ViewName, DimName, SubName);

Exp: ViewSubsetAssign('Products2', 'View2', 'Expenses', 'SubOffice');

Assigns a named subset to a cube view.

15. ViewColumnDimensionSet

Syntax: ViewColumnDimensionSet(CubeName, ViewName, DimName, StackPosition);

StackPosition A number that indicates the stack position of the dimension in the view. This is a
1-based number. 1 indicates the top-most stack position. 2 indicates a position
below 1, and so on.

Exp: ViewColumnDimensionSet('Products2', 'View2', 'Scenario', 1);

Sets a column dimension for a TM1 view.

16. ViewRowDimensionSet

Syntax: ViewRowDimensionSet(CubeName, ViewName, DimName, StackPosition);

Exp: ViewRowDimensionSet('Products2', 'View2', 'Scenario', 1);

Sets a row dimension for a TM1 view.

17. ViewTitleDimensionSet

Syntax: ViewTitleDimensionSet(CubeName, ViewName, DimName);

Exp:

Sets a title dimension for a TM1 view.

18. ViewTitleElementSet

Syntax: ViewTitleElementSet(CubeName, ViewName, DimName, Index);

Exp:

Sets a title element for a TM1 view. ViewTitleElementSet is used in conjunction with the
ViewTitleDimensionSet function.

Planning Analytics:

19. ViewCreateByMDX

Syntax: ViewCreateByMDX(CubeName, ViewName, MDX_Expression);

20. ViewMDXGet

Syntax: ViewMDXGet(CubeName, ViewName);

Retrieves the MDX expression for an existing MDX view.

21. ViewMDXSet

Syntax: ViewMDXSet(CubeName, ViewName, MDX_Expression);

Sets the MDX expression for an existing MDX view.


22. DisableMTQViewConstruct

Syntax: DisableMTQViewConstruct();

DisableMTQViewConstruct disables multi-threaded query processing when calculating a view to be used


as a TurboIntegrator datasource for a single TurboIntegrator process. When MTQQuery=T in the
tms1.cfg file, DisableMTQViewConstruct can be called to override this value on a TurboIntegrator
process.
This function must appear in the Prolog, it has no effect in any other procedure within a process.

23. EableMTQViewConstruct

Syntax: EableMTQViewConstruct();

EnableMTQViewConstruct enables multi-threaded query processing when calculating a view to be used


as a TurboIntegrator datasource for a single TurboIntegrator process. When MTQQuery=F in the
tms1.cfg file, EnableMTQViewConstruct can be called to override this value on a TurboIntegrator
process.

The value of MTQQuery can be overridden on a single TurboIntegrator process by calling the
EnableMTQViewConstruct function.
If MTQQuery=F in the tms1.cfg file on the server where this function is run, EnableMTQViewConstruct
can be called to override this value on a single TurboIntegrator process.
You can enable EnableMTQViewConstruct in either the Prolog or Epilog section of a TurboIntegrator
process. For efficiency, enable EnableMTQViewConstruct in the first, or very close to the first, statement
in the Prolog section of your process.

Attribute Manipulation TI Functions

1. ATTRNL

Syntax: AttrNL(DimName, SubName, AttrName, [LanglocaleCode]);

Exp: attrNL('Product', 'Newspaper', 'News', 'fr' );

Returns a numeric attribute for a specified element of a dimension.

2. ATTRSL

Syntax: AttrSL(DimName, SubName, AttrName, [LanglocaleCode]);

Exp: attrSL('Product', 'Newspaper', 'News', 'fr' );

Returns a string attribute for a specified element of a dimension.


3. AttrDelete

Syntax: AttrDelete(DimName, AttrName);

Exp: AttrDelete('Product', 'News');

Deletes an element attribute from the TM1 database.

4. AttrInsert

Syntax: AttrInsert(DimName, PrevAttr, AttrName, Type);

PrevAttr The attribute that precedes the attribute you are creating.
AttrName The name you want to assign to the new attribute.
Type The type of attribute. There are three possible values for the Type argument:
 N - Creates a numeric attribute.
 S - Creates a string attribute.
 A - Creates an alias attribute.

Exp: AttrInsert('Product','Study3','Study4', 'S');

Creates a new element attribute for a dimension. The function can create a string, numeric, or alias
attribute.

5. AttrPutN

Syntax: AttrPutN(value, DimName, ElName, AttrName);

Exp: AttrPutN(456, 'Product', 'Notebook', 'Study5');

Assigns a value to a numeric element attribute.

6. AttrPutS

Syntax: AttrPutS(value, DimName, ElName, AttrName);

Exp: AttrPutS('Notepad', 'Product', 'Notebook', 'Study5');

Assigns a value to a string element attribute.

7. CubeAttrDelete

Syntax: CubeAttrDelete(AttrName);

CubeAttrDelete deletes a cube attribute from the TM1 database.


8. CubeAttrInsert

Syntax: CubeAttrInsert(PrevAttrName, NewAttrName, AttrType);

CubeAttrInsert creates a new attribute for cubes on your TM1 server.

9. CubeAttrPutN

Syntax: CubeAttrPutN(NumericValue, CubeName, AttrName, [LangLocaleCode] );

CubeName The cube for which you want to assign an attribute value.
AttrName The attribute whose value you want to assign.
LangLocaleCode This optional parameter specifies the language locale code to which the
NumericValue applies.
Valid LangLocaleCode values correspond to the ISO 639-1 international
language codes listed in the }Cultures control dimension.
When the LangLocaleCode is not specified or is omitted, the base attribute
value is updated.

10. CubeAttrPutS

Syntax: CubeAttrPutS(StringValue, CubeName, AttrName, [LangLocaleCode] );

CubeAttrPutS assigns a value to a string cube attribute.

11. CubeAttrN

Syntax: CubeATTRN(CubeName, AttrName);

AttrName: The attribute for which you want to retrieve a value. This argument must be a valid attribute
of the cube.
Returns a numeric attribute for a specified cube.

12. CubeAttrS

Syntax: CubeATTRS(CubeName, AttrName);

Returns a string attribute for a specified cube.

13. CubeAttrNL

Syntax: CubeATTRNL(CubeName, AttrName, [LangLocaleCode]);

Returns a numeric attribute value for a specified cube with respect to a given locale.
14. CubeAttrNL

Syntax: CubeATTRSL(CubeName, AttrName, [LangLocaleCode]);

Returns a string attribute value for a specified cube with respect to a given locale.

15. DimensionAttrDelete

Syntax: DimensionAttrDelete(AttrName);

Deletes a dimension attribute from the TM1 database.

16. DimensionAttrInsert

Syntax: DimensionAttrInsert(PrevAttrName, NewAttrName, AttrType);

Inserts a dimension attribute to the TM1 database.

17. DimensionAttrPutN

Syntax: DimensionAttrPutN(NumericValue, DimensionName, AttrName, [LocalLangCode] );

Assigns a value to a numeric dimension attribute.

18. DimensionAttrPutS

Syntax: DimensionAttrPutS(String, DimensionName, AttrName, [LocalLangCode] );

Returns a string attribute for a specified dimension

19. DimensionAttrN

Syntax: DimensionAttrN(DimName, AttrName);

Returns a numeric attribute for a specified dimension

20. DimensionAttrS

Syntax: DimensionAttrS(DimName, AttrName);

Returns a string attribute for a specified dimension

21. DimensionAttrNL

Syntax: DimensionATTRNL(DimName, AttrName, [LangLocaleCode]);

Returns a numeric attribute value for a specified dimension with respect to a given locale.
22. DimensionAttrNL

Syntax: DimensionATTRSL(DimName, AttrName, [LangLocaleCode]);

Returns a string attribute value for a specified dimension with respect to a given locale.

ASCII and Text TurboIntegrator Functions

1. ASCIIDelete

Syntax: ASCIIDelete(FileName);

Deletes an ASCII file.

2. ASCIIOutput

Syntax: ASCIIOutput(FileName, String1, String2, ...Stringn);

Writes a comma-delimited record to an ASCII file.

3.

TI Local Variables

DATASOURCECUBEVIEW = 'ViewName';

The Viewname should be the name of an existing view.

You might also like