Page 1 of 1
Aceess TM1 Objects using Web Portal.
Posted: Thu Jan 19, 2012 10:41 am
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.
Re: Aceess TM1 Objects using Web Portal.
Posted: Thu Jan 19, 2012 4:22 pm
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?
Re: Aceess TM1 Objects using Web Portal.
Posted: Thu Jan 19, 2012 7:12 pm
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?
Re: Aceess TM1 Objects using Web Portal.
Posted: Wed Jan 25, 2012 6:30 am
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?
Re: Aceess TM1 Objects using Web Portal.
Posted: Wed Jan 25, 2012 1:46 pm
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.
Re: Aceess TM1 Objects using Web Portal.
Posted: Wed Jan 25, 2012 2:24 pm
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.
Re: Aceess TM1 Objects using Web Portal.
Posted: Thu Jan 26, 2012 11:56 pm
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
Re: Aceess TM1 Objects using Web Portal.
Posted: Fri Jan 27, 2012 4:50 am
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?
Re: Aceess TM1 Objects using Web Portal.
Posted: Fri Jan 27, 2012 5:09 am
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.
Re: Aceess TM1 Objects using Web Portal.
Posted: Tue Jan 31, 2012 5:25 am
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:)

Re: Aceess TM1 Objects using Web Portal.
Posted: Wed Feb 01, 2012 12:42 am
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
Re: Aceess TM1 Objects using Web Portal.
Posted: Wed Feb 01, 2012 11:06 am
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:)
Re: Aceess TM1 Objects using Web Portal.
Posted: Wed Feb 01, 2012 12:52 pm
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.
Re: Aceess TM1 Objects using Web Portal.
Posted: Thu Feb 02, 2012 6:03 am
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.
Re: Aceess TM1 Objects using Web Portal.
Posted: Thu Feb 02, 2012 8:15 am
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...
Re: Aceess TM1 Objects using Web Portal.
Posted: Fri Feb 03, 2012 3:44 am
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...

...
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
Re: Aceess TM1 Objects using Web Portal.
Posted: Fri Feb 03, 2012 5:38 am
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
Re: Aceess TM1 Objects using Web Portal.
Posted: Fri Feb 03, 2012 11:41 am
by sg2012
Hey thanks a tonnn RObin..
