Page 1 of 1

Auto Recalculate for Cube Viewer

Posted: Tue Feb 05, 2019 5:34 am
by macsir
Hi, all
I am just wondering if there is any hidden or undocumented function to enable Auto Recalculate for a Cube Viewer? So that when a user open a default view with that enabled already.
Similar to other functions, like ViewRowSuppressZeroesSet, ViewRowDimensionSet etc.
The reason is that all our cube views are rebuilt overnight using that group of functions based on definition in a centralized view management cube.
If it has, then it would be nice.

Re: Auto Recalculate for Cube Viewer

Posted: Tue Feb 05, 2019 11:23 am
by Wim Gielis
Hello,

I haven't found it and I would be happy to use it !

Re: Auto Recalculate for Cube Viewer

Posted: Tue Feb 12, 2019 4:41 am
by kangkc
Was bored with the long rule I am writing currently and decided to take a break and investigate this.
If you edit the .vue file directly, the auto-calc flag is at code 376. A value of "1" means auto-recalc.
Problem is public view won't work after you manually edit until a server restart. I presume you can write a external program to modify this flag while server is on schedule down time. Did some testing by changing this between restart and seems to be switching correctly from auto to manual recal.

389,100
390,"By Country auto"
370,0
361,1
362,1
363,0
364,0
365,
366,
367,0
376,1
375,b:0.#########G|0|
374,1
7,actvsbud
270,3
Variance
Actual
Budget

Re: Auto Recalculate for Cube Viewer

Posted: Fri Apr 26, 2019 10:18 am
by Wim Gielis
I was looking at a way to do this using the TM1 REST API. With this command:

http://localhost:8001/api/v1/Cubes('JM')/Views('Default')

I find the details of the Default view on the JM cube. I get back:

Code: Select all

{
@odata.context: "../$metadata#Cubes('JM')/Views/ibm.tm1.api.v1.NativeView/$entity",
@odata.etag: "W/"df29494e10347e0a4961c00715af05d5d2d4f1bd"",
Name: "Default",
Attributes: {
Caption: "Default",
test: "Default"
},
Columns: [
{ }
],
Rows: [
{ }
],
Titles: [ ],
[b]SuppressEmptyColumns: true,
SuppressEmptyRows: true,
FormatString: "0.00"
}
The (3) properties at the bottom are the ones that I find back with:

http://localhost:8001/api/v1/$metadata

Does this mean that other properties are not accessible ? I am using PAL 2.0.6

Thanks,

Wim

Re: Auto Recalculate for Cube Viewer

Posted: Mon Apr 29, 2019 4:02 am
by macsir
I don't think it is available via rest api at this stage as I checked. Perhaps we can request IBM to add missing feature by voting? :lol:

Re: Auto Recalculate for Cube Viewer

Posted: Mon Apr 29, 2019 4:03 am
by macsir
kangkc wrote: Tue Feb 12, 2019 4:41 am Was bored with the long rule I am writing currently and decided to take a break and investigate this.
If you edit the .vue file directly, the auto-calc flag is at code 376. A value of "1" means auto-recalc.
Problem is public view won't work after you manually edit until a server restart. I presume you can write a external program to modify this flag while server is on schedule down time. Did some testing by changing this between restart and seems to be switching correctly from auto to manual recal.

389,100
390,"By Country auto"
370,0
361,1
362,1
363,0
364,0
365,
366,
367,0
376,1
375,b:0.#########G|0|
374,1
7,actvsbud
270,3
Variance
Actual
Budget
Thanks, good finding! At least we can have a workaround to achieve it. :D