Aceess TM1 Objects using Web Portal.

Post Reply
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hi all,


We normally use TM1 Web by giving the URL in the browser.
Now I have a scenario where user cant give URL of the web, but has to access TM1 Objects on TM1 Web using Web Portal.
How to access WEb or TM1 Objects using the same.
declanr
MVP
Posts: 1829
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Aceess TM1 Objects using Web Portal.

Post by declanr »

sg2012,
Now I have a scenario where user cant give URL of the web
What is it you are referring to here?... Do you mean that the URL most clients use doesn't work for a particular one?
If so; does said client have access to the host server?
Declan Rodger
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: Aceess TM1 Objects using Web Portal.

Post by PlanningDev »

How is it possible that a user has access to the web/TM1 Objects but can't give a URL? If you had access to the web or tm1web then by definition you would have browser access.

If not TM1 web what about perspectives for excel?
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hi All,

Consider evrything in TM1 WEB

I got the URL to access Cube View, Web Sheet and Navigation Tree.
Do read Developer's Guide for the same.(Chapter 8).

It goes like this:
FOR CUBE VIEWS:
http://domain name/tm1web/tm1webMain.aspx?action=OpenObject&type=CubeViewer&value=Cubename$$Viewname

FOR WEBSHEETS:
http://domain name/tm1web/tm1webMain.aspx?action=OpenObject&type=WebSheet&value=Path of the sheet

FOR NAVIGATION TREE:
http://domain name/tm1web/tm1webMain.aspx?action=OpenObject&type=NavigationTree&ContentType=html

But in this navigation Tree we cannot interact with the TM1 objects,
For interacting, we need to write java script function which will be called from the same URL by &CallBack parameter.
i.e.
http://domain name/tm1web/tm1webMain.aspx?action=OpenObject&type=NavigationTree&ContentType=html&CallBack=jspfunctionname.

So my question is where to write the jsp function and how to write a javascript function to open a view in tm1 web?
User avatar
jim wood
Site Admin
Posts: 3958
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: Aceess TM1 Objects using Web Portal.

Post by jim wood »

Firstly this IIS based so you can't use JSP. That would require tomcat or apache as JSP is server side. Secondly I'm not 100% certain what you are trying to do/ Are you trying to run a view outside of TM1 Web? If so then you have to interface with the TM1 Web API.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Aceess TM1 Objects using Web Portal.

Post by tomok »

The TM1Web URL API is not really an "API". It's really just a way to put the user into a specific cube view, report, whatever, without having to navigate to get there. By passing parameters as part of the URL you can tell TM1Web where to go. It doesn't do anything else, as in there is no way to "interact" with anything or to talk back and forth with the TM1 Server. One of the uses of the TM1Web API is would be to create your own web site and generate these URLs any way you want and then create hyperlinks to the specific object in TM1 Web. You could have javascript open a new window and pass it the TM1Web URL. You would probably need to be using single sign-on for that to function effectively. The possibilities are endless but in the end all you can really do, as far as TM1Web is concerned is just open an object.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Aceess TM1 Objects using Web Portal.

Post by paulsimon »

Hi

A less technical option that I have implemented which doesn't need any Java Script is to use the Excel HYPERLINK function.

When the user goes into TM1 Web, you can configure their start up to be a Web Sheet (Its a setting in Web.Config)

Then you can build up the required URL using Excel Formula, values retrieved from TM1 Cubes, etc.

You then use the URL in a HYPERLINK Function. When they click on the link it then opens the View in TM1 Web.

I set it up so that the initla Web Sheet was a menu of other sheets. They could then click on links to go to other sheets. The other sheets then presented a report or entry screen and had a list of Views that could be accessed. Once they selected a View, it used formulas to build up the URL screen to give the users current selections of Cost Centre etc from the Report. Then when they click on the link to access the View, it would open showing the same Cost Centre etc that they had selected on the report.

There are more details on this in an earlier posting I made on this Forum.

Regards

Paul Simon
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hey Paul
Thanks a ton...

But can u please give link of your earlier post???

N 1 more question...Where is web.config located?
Alan Kirk
Site Admin
Posts: 6647
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: Aceess TM1 Objects using Web Portal.

Post by Alan Kirk »

sg2012 wrote:Hey Paul
Thanks a ton...

But can u please give link of your earlier post???
That's where the Advanced Search function at the top right of the page comes in.

http://www.tm1forum.com/search.php?keyw ... mit=Search
sg2012 wrote:N 1 more question...Where is web.config located?
And that question is answered on the very first page of the documentation that I sent you to in this thread, and which you said that you were going to read through. Once again, it will be found here.
"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.
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hi all,
i have gone through the Developer's Guide document.
In this doc, in 8th Chapter page no. 171 , it is written that we can call back TM1 Objects from Navigation Tree using Java Script.
Kindly refer the that doc and if any 1 has any idea as to how to do that,please revert back asap.
Thanks:)
:D
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Aceess TM1 Objects using Web Portal.

Post by paulsimon »

Sg

Alan and I have both given you ways to do this without JavaScript. From what I can recall the example I posted even had sheets attached to it. I suggest that you use the search facility and find it.

I would strongly advise against using JavaScript with TM1 Web. It is always a maintenance headache. It is likely to get lost every time you upgrade your version of TM1 Web, and your are unlikely to find many Tm1 consultants who can maintain it. I Have only ever seen JavaScript used for flashy demos, but never in a real world application.

Regards

Paul Simon
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hey Paul...

How about using TM1 API for the same?
And I read almost all posts by you.
But coudlnt find relevant information.
Were you talking about http://www.tm1forum.com/viewtopic.php?f ... ge+#p24898 post?
If no, can you please give the link or atleast some snapshots of the same.
Even if you cant,no problem...Thanks for your help:)
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Aceess TM1 Objects using Web Portal.

Post by tomok »

The API is designed to provide calls to the TM1 Server from another programming environment, like VB, C++, or Java. Javascript is not a full programming environment, it's just a scripting language. You can't use the API with Javascript. Even if you could, the API has no functions for communicating with TM1 Web, only the TM1 Server and Admin Server services.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

paulsimon wrote:Hi

A less technical option that I have implemented which doesn't need any Java Script is to use the Excel HYPERLINK function.

When the user goes into TM1 Web, you can configure their start up to be a Web Sheet (Its a setting in Web.Config)
Hey paul,
I dont want Web Sheet as my startup page.
as I dont want to give links only to my Views.
But I want all the cubes with their VIews(Both Private and Public) to be listed and we should be able to open all the views.

Instead i want only Navigation Tree as my startup page.
I have attached the Navigation Tree screenshot which I ahve opened using following URL:
http://server ip/tm1web/tm1webMain.aspx?action=OpenObject&type=NavigationTree&ContentType=html

And I want to open the Views listed under Views node.
I hope question is clear this time.
N looking forward to find the solution soon...
please help if possible.
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Aceess TM1 Objects using Web Portal.

Post by lotsaram »

sg2012 wrote:I dont want Web Sheet as my startup page.
as I dont want to give links only to my Views.
But I want all the cubes with their VIews(Both Private and Public) to be listed and we should be able to open all the views.

Instead i want only Navigation Tree as my startup page.
I have attached the Navigation Tree screenshot which I ahve opened using following URL:
http://server ip/tm1web/tm1webMain.aspx?action=OpenObject&type=NavigationTree&ContentType=html

And I want to open the Views listed under Views node.
I hope question is clear this time.
N looking forward to find the solution soon...
please help if possible.
It might help (a lot) if you explain just what your "web portal" is where you want to display TM1Web objects without full access to the Tm1Web application and website itself. Is the "portal" you are talking about SharePoint or Cognos 10 or 8.x or something else?

Using the TM1 Web "URL API" you can very easily pull across a view into an html frame embedded practically anywhere you like on your intranet but any kind of dynamic custom navigation tree browsing is going to be difficult.

Like many others I would advise against any heavy web customization as it will limit the ability of the application to by dynamic and become a maintenance headache. Wherever possible out of the box is best for TM1 front ends.

What you also haven't explained is the rationale for why users can't be allowed to browse within TM1Web itself...
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hey thanks lotsaram for your reply.

The portal is Sharepoint.
Hmmm even I wondered why we were not using TM1 Web directly.
But still this is the challenge for me...:P...
And hey I found some ways to do the said task using APIs.But still exploring APIs part as this concept is entirely new for me.
And hey as you said dynamic customisation of Navigation Tree can be done,but is difficult.
So can you suggest any ideas if you know to do the same(i.e. Dynamic Customize Navigation Tree)?

ThnakYou evryone for answering all my questions...
I know many times they were basuc and stupid:P...but being a fresher I know neither about TM1 nor about forums:P...
Thanks for your support guysss...
:)
Have a nice day:D
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Aceess TM1 Objects using Web Portal.

Post by rmackenzie »

As a general example, here is how to handle custom integration of the navigation tree object:

Code: Select all

<html>
	<head>
		<title>Robin's TM1 Web URL API Navigation Tree Example</title>
		<script type="text/javascript">
			function handleNavTreeOpenObject(id, type, isPrivate, name, description, source)
			{
				var url, baseUrl				
				
				baseUrl = 'http://YOUR_SERVER_NAME/TM1Web/TM1WebMain.aspx?action=OpenObject&type=';
				url = '';
				
				switch (type) {
					case "Websheet":
						url = baseUrl + type + '&value=' + source;
						break;
					case 'Cubeviewer':
						url = baseUrl + type + '&value=' + id;
						break;
					default:
						alert('Not sure what to do with this one!');
						break;
				}
				
				if (url != '') {
					document.getElementById('content_frame').src =  url;
				}
			}
		</script>
	</head>

	<body>
		<iframe id="nav_tree_frame" name="nav_tree_frame" width=350 height=800 src="http://YOUR_SERVER_NAME/TM1Web/TM1WebMain.aspx?action=OpenObject&type=NavigationTree&Callback=handleNavTreeOpenObject">
		</iframe>
		<iframe id="content_frame" name="content_frame" width=650 height=800>
		</iframe>
	</body>
</html>
To use the example, paste the code above into a file called 'custom.html' and drop that in the TM1Web folder in inetpub\wwwroot. Then you can view the page via http://YOUR_SERVER_NAME/tm1web/custom.html. Hopefully people can see how this is a useful jumping off point for developing custom TM1 Web-based websites where the out-of-the-box client is somehow falling short.

I sometimes feel alone in being the type of person to actually RTFM, and on this topic it is quite useful. However, it neglects to address issues with the same origin policy. AFAIU this means that you aren't going to be able to integrate the callback function with Sharepoint which almost certainly is not running on the TM1 server (if it is, it probably shouldn't be). There's a lot of material out there (just google for it) to work-around the generic cross-domain problem but once again, I can't see it working in Sharepoint even if your IT administrators were comfortable with a new developer requesting to get custom code into their enterprise portal ...

I've done Sharepoint integration a few times and mostly people want a handful of websheets or cubeviews accessible to Sharepoint users. I don't really understand why you'd want to implement the navigation tree in Sharepoint when Sharepoint itself is a system for organising and managing content and documents! If you are a 'fresher' in TM1 then I'd recommend you get up to speed on core concepts (cube/ report design and system administration) before getting stuck into these sort of subject areas.

HTH
Robin
Robin Mackenzie
sg2012
Posts: 27
Joined: Tue Jan 10, 2012 9:13 am
OLAP Product: Tm1 Cognos
Version: 9.5.2
Excel Version: 2007

Re: Aceess TM1 Objects using Web Portal.

Post by sg2012 »

Hey thanks a tonnn RObin..
:D
Post Reply