Page 1 of 1
Tm1 logout for websheet launched via URL API
Posted: Tue Dec 13, 2011 11:05 am
by Lewis
I have embedded Tm1 webpages / views in sharepoint using URL API - when user exits SP
and re-enters they have multiple IDs logged in since they are not logged off Tm1 when exiting SP.
* same issue with direct opens using Tm1 URL API link and user closes page (IE/FF/Chrome) and re-enters .
Is there a way to force the logout when user closes websheet ? Any option(s) in Tm1web.config?
Embedded a logout option in websheet ?
* Logout option on normal Tm1web banner is not available .
* Tm1 config timeout is set to 30 mins
Thanks
Lewis
9.5.2 (64) Tm1 server
Re: Tm1 logout for websheet launched via URL API
Posted: Tue Dec 13, 2011 3:58 pm
by declanr
You could reduce the IdleConnectionTimeOutSeconds paramter in the tm1 config file.
This would off course disconnect after inactivity in any interface as opposed to just TM1 web, not sure if there is a specific web time out but I would doubt it...
On second thoughts a quick scan of documentation found:
httpRuntime executionTimeout="7200"
In the web config file, this seems more like what you are looking for (obviously the time is in seconds.)
Re: Tm1 logout for websheet launched via URL API
Posted: Wed Dec 14, 2011 11:06 pm
by rmackenzie
Lewis wrote:Is there a way to force the logout when user closes websheet ?
I'm not sure if the following would work in a Sharepoint page, but in a custom HTML page you could handle the
unbeforeunload event in combination with calling the
logout action within the url api. Does your Sharepoint environment allow you to write custom Javascript event handlers?
Re: Tm1 logout for websheet launched via URL API
Posted: Thu Dec 15, 2011 11:23 am
by Lewis
I was trying to avoid any custom code - will play with it in my dev system. I have been been able to accomplish
the client logout ( clumsily ) with hyperlink using the url action = logout , but still requires user action.
When hyperlink is used in direct launch websheets the logout leaves a page that needs to be closed and does not
address the issue with a direct launch Tm1views .
I guess the issue is really beyond my initial question - what I would really like to have available is URL API option
that would allow the Tm1web banner to display - also on my "wishlist" is an update to Tm1web that would close tm1 web page
(whether opened via direct launch or normal Tm1web launch ) and logoff the client .
Thanks for your suggestion
Lewis
Re: Tm1 logout for websheet launched via URL API
Posted: Fri Nov 30, 2012 8:33 am
by iansdigby
Just wondering if lewis ever found a resolution to this problem as it is one I am now facing.
Regards, Ian
Re: Tm1 logout for websheet launched via URL API
Posted: Wed Jun 12, 2013 6:16 pm
by ardi
Hi,
I know this is an old thread but I was just wondering if Lewis can elaborate more on how did he use the Action = Logout in the URL API Link?
I am trying to implement something similar
Thanks
Ardi
Re: Tm1 logout for websheet launched via URL API
Posted: Thu Jun 13, 2013 3:20 am
by rmackenzie
ardi wrote:I was just wondering if Lewis can elaborate more on how did he use the Action = Logout in the URL API Link?
The URL to call is:
Code: Select all
http://YOUR_WEB_SERVER/TM1Web/TM1WebMain.aspx?action=Logout
The issue here is that if you want this URL request to occur when the user shuts down the browser then you need to custom code it (as I explained above) in Javascript. E.g.
Code: Select all
<script type="text/javascript">
window.onbeforeunload = ensureTM1ClientLogoff;
function ensureTM1ClientLogoff()
{
var request = new XMLHttpRequest();
var url = 'http://YOUR_WEB_SERVER/TM1Web/TM1WebMain.aspx?action=Logout';
request.open('GET', url, false);
request.send(null);
}
</script>
If you include this code between the <head></head> tags then the client should be logged off when you close the browser session. I'm not making guarantees around this because you haven't stated how you are logging the client on in the first place. This could happen in a variety of ways such that I've got to add a disclaimer that this code simply may just not work for you. It's worked for me where IntegratedLoginMode is 1 and 2. I.e. I've used the default TM1 Web login functionality that pops up when you use URL API without authentication parameters, or just using Windows integrated authentication. Certainly, the behaviour is likely to differ from browser to browser.
If this isn't going to fly for you then, as I see it, the most obvious alternative would be to have a big 'LOG OUT' button somewhere on your page and train your users to click it rather than just closing the browser.
Re: Tm1 logout for websheet launched via URL API
Posted: Thu Jun 13, 2013 2:31 pm
by ardi
Thanks Mackenzie,
Here is my issue. I have built a summarized Report / Active Form, which shows kind of summarized data. In the report, I have created an Action Column, which is populated with a URL API Hyperlink that takes the user to an Adjustment Websheet. In the hyperlink, I pass all the parameters for the specific Report Row, so that the "Navigate to" Sheet, is filtered and shows only the data related to the Row in the "Navigate From" websheet. The "Navigate to" websheet opens in a new browser session. If the user goes back to "Navigate from" websheet and clicks on another row, the user is taken to the same "Navigate To" websheet, but it does not automatically get refreshed, so the User has to click on the Recalc button on the toolbar in order to refresh the websheet. If the user closes the websheet before going to the "Navigate From" websheet, and then user clicks on another row, then the "Navigate to" websheet opens (in a new web browser session) but at least the user does not have to refresh the websheet.
WHat I'm trying to do is: Give user a way to close the "Navigate To" websheet, or give him a way to automatically refresh the "Navigate To" websheet when user clicks on another row in the "Navigate From" websheet.
By looking at the documentation, i see that there are a couple of Actions that can be used in the URL API, but I can't find a way how to use them.
So, there is an Action=Close. I tried to use it in the following ways, but it does not work:
HYPERLINK("http://TM1_WEB_SERVER/tm1web/TM1WebSheet.aspx?action=Close","Close")
HYPERLINK("http://TM1_WEB_SERVER/tm1web/TM1WebMain.aspx?action=Close","Close")
Also for the action=Recalc i tried the following Links but they don't do anything
HYPERLINK("http://TM1_WEB_SERVER/tm1web/TM1WebSheet.aspx?action=Recalc","Refresh")
HYPERLINK("http://TM1_WEB_SERVER/tm1web/TM1WebMain.aspx?action=Recalc","Refresh")
Thank you
Ardi
Re: Tm1 logout for websheet launched via URL API
Posted: Fri Jun 14, 2013 1:13 am
by rmackenzie
Ardi - this isn't really about using the logout action and you're really asking the same question that you've posted already in
this thread. But anways...
I don't think what you are trying to achieve with the URL API is what it was actually designed for. My understanding is that it was designed for embedding TM1 Web objects in non-TM1 Web web pages. You're trying to use it as a navigational device
within TM1 Web itself by combining it with the Excel HYPERLINK function. Sorry, I realise that I sound like a wet weekend but sometimes it just happens that you can only go so far down a path and then you get to a dead end with the solution. This can often happen when you're trying to use one thing to do something slightly different from what it was designed for. I guess you could try and combine different action clauses in the URL and muck about with capturing ObjectIds and whatnot, but ultimately you may never to get it to work the way you want - I am sure there is no 'silver bullet' solution to get what you want. Happy to be shown otherwise, though.
I agree that it does look great for the report to have the hyperlink per row and also it is very intuitive for the user. However, the way it works for me is that the new browser window opens up with both the "from" and "to" reports and this new window is on top of the original browser window which still has the TM1 Web page containing the "from" report. Now for me, this is a major problem because I have the same report open twice in two windows and I have now lost control (from a design point of view) of the application navigation behaviour. This totally outweighs the 'nice-ness' of having each row of the "from" report having a hyperlink to its detailed adjustment sheet. I guess if you're building something for one or two guys in a Finance department then you can get away with it. Once your application has to scale up to hundreds of users then this issue becomes a fail, and probably an embarrasing one at that.
I think the 'correct' way to approach this per Aude's suggestion in the original thread - i.e. have a single action button at the the top of the page that says 'Navigate to detail adjustments for selected row' (or something similar). This way you control your page management and the overall application is not getting out of your control (by having the same pages open in multiple browser sessions etc). There is some relevant documentation on this topic
here.
Alternatively, the solution that Declan uses is really going to be a training point for your users. However I suggest because experience says that not all users follow training, then you are always going to have an issue with this.