TM1PrimaryDBName() not firing in promoted PAfe but is in Web

Post Reply
User avatar
Ajay
Regular Participant
Posts: 183
Joined: Wed May 14, 2008 8:27 am
OLAP Product: TM1
Version: 10.2.0, PA 2.0.9
Excel Version: 2016
Location: London

TM1PrimaryDBName() not firing in promoted PAfe but is in Web

Post by Ajay »

Hi All

I've come across something I wasn't expecting and wanted to make sure it wasn't me having a "moment".

We are using the TM1PRIMARYDBNAME() function to retrieve the name of the TM1 instance. We then set the value returned against an excel range name which then gets used in all TM1/PA formulae.

We have instances as below:

"DEV - 12345"
"UAT - 12345"
"PRD - 12345"

What I have observed is if I promote the reports from one instance to another, and let's just say that they start off in "DEV - 12345" and move up to "UAT - 12345", is that when I open TM1/PA Web in the "UAT - 12345" environment, my reports correctly show that the TM1PRIMARYDBNAME() has retrieved the new server name of "UAT - 12345" and everything works......happy days !

However........if I open that same report in PAfE, within the "UAT - 12345" instance, the TM1PRIMARYDBNAME fails to update on opening the report, it still returns the "DEV - 12345" instance.

I thought that this was going to fire the new value upon opening as it does in web, but it didn't.

Seems a little disappointing but not sure if this is intended or not. Anyone able to confirm that this is expected ?

On PA 2.0.9.1 and PAfE 2.0.54

Thanks
Ajay
User avatar
Steve Rowe
Site Admin
Posts: 2410
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: TM1PrimaryDBName() not firing in promoted PAfe but is in Web

Post by Steve Rowe »

This might be the a bug or might be the different calculation method in Pafe.

In Pafe with calculation set to automatic (the default behaviour) the Pafe piggy backs on Excel cell dependency logic to determine what cells to calculate.

Since TM1PRIMARYDBNAME() has no dependency it probably never gets calculated.

You might be able to force the calculation by including a volatile function (untested) in the formula.

Something like =If(Now()=0,0, TM1PRIMARYDBNAME() )

In theory, since Now() is volatile then this will force the If statement to evaluate the TM1 function.

HTH
Technical Director
www.infocat.co.uk
User avatar
Ajay
Regular Participant
Posts: 183
Joined: Wed May 14, 2008 8:27 am
OLAP Product: TM1
Version: 10.2.0, PA 2.0.9
Excel Version: 2016
Location: London

Re: TM1PrimaryDBName() not firing in promoted PAfe but is in Web

Post by Ajay »

Thanks for your help Steve

Spent a bit of time looking at this, but it caused our SUBNMs to fail. We have selections (which can vary based on new masterdata) based on SUBNMs placed on a selection tab.

Unfortunately these defaulted to RECALC_XXX when we used the TM1PrimaryDBName formulae with the condition applied.

I've put in a ticket with IBM about this who replied with the following:
TM1PRIMARYDBNAME does have its drawbacks when working with multiple PA Servers. If a user is connected to a PA Server and then that user connects to a second PA Server, the TM1PRIMARYDBNAME formula will not update. The formula only returns the first PA Server name that a user connects to during a PAX session. If a user would like the PAX workbook to connect to a different PA Server dynamically, that user would need to completely disconnect from all PA Servers in PAX and then connect to the server of choice first.
Would have been nice to cycle through our environments using this function, but doesn't look like - at least for PAfE - it quite works to be really useful for us anyway.

Cheers for help though
Ajay
Post Reply