How to check if a user is connected to TM1 server in Excel?

Post Reply
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

How to check if a user is connected to TM1 server in Excel?

Post by mce »

Hi,

In an Excel spreadsheet, using VB or Excel Macro code, how can we check if a user is connected to a TM1 server or not?
This is to avoid running n_disconnect or n_connect blindly without checking if the user is really connected or not.

Any help would be appreciated.

Regards
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: How to check if a user is connected to TM1 server in Exc

Post by Martin Ryan »

Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to check if a user is connected to TM1 server in Exc

Post by Alan Kirk »

mce wrote:Hi,

In an Excel spreadsheet, using VB or Excel Macro code, how can we check if a user is connected to a TM1 server or not?
This is to avoid running n_disconnect or n_connect blindly without checking if the user is really connected or not.

Any help would be appreciated.

Regards
Another way is to just do a DBR to a cube that all users have access to. (Create one if you need to.) If it returns the expected value, they're connected.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
Oratia623
Posts: 40
Joined: Mon Apr 27, 2009 5:36 am
OLAP Product: TM1/PA/CA
Version: V7.x to 2.0.9+
Excel Version: All
Location: Sydney, Australia

Re: How to check if a user is connected to TM1 server in Exc

Post by Oratia623 »

I use the worksheet function: TM1User("ServerName"). If it returns a blank - then they are not connected.
Though I am not sure in what version this function was introduced (I am using TM19.5.1)
Paul Williamson
____________________________________________________________________________________
I came. I saw. I did not concur.
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to check if a user is connected to TM1 server in Exc

Post by Alan Kirk »

Oratia623 wrote:I use the worksheet function: TM1User("ServerName"). If it returns a blank - then they are not connected.
Though I am not sure in what version this function was introduced (I am using TM19.5.1)
9.1 SP2.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to check if a user is connected to TM1 server in Exc

Post by lotsaram »

Wow that post was a blast from the past, shame there are no dates on the old Applix forum threads.
Post Reply