Portal user Login Directed Towards Different Pages

Posted by Rollbase User on 11-Jan-2011 17:07

Is there a wat to direct the portal login to a specific page based on where the user left off in the application / or based on a status/picklist in the application? That way if a portal user did not complete all of the required forms it will take them to where they left off or atleast to a page that gives them opportunity to complete them.

All Replies

Posted by Admin on 11-Jan-2011 21:28

You can create a script to redirect visitor:
window.location.href = '...';

Posted by Admin on 13-Jan-2011 18:52

ok, what field/code do you use to reference the page?



window.location.href = 'Asset (View)';



In this example i used page name, but i dont think that is corretc, what would I use?

Posted by Admin on 13-Jan-2011 19:22

OK, I figured out what to use to tell them what page to be directed to -



window.location.href = 'http://www.rollbase.com/prod1/portal/portal.jsp?c=7045501&p=7210996&g=7445236&id="!id"&d=7445236';



I used "!id" to take the user id from the login page and merge it to this url - but I am having an issue now - I need to create a field "Last page visited" i need a script that populates that field from certan pages with the page ID# so I can merge that in the URL as well. Any hints on a script that will capture thepage ID and move it to a text field?



Is it even possible to merge a field into a url listed in the HTML onload event handlers page? Or is it more complicated than that?

Posted by Admin on 13-Jan-2011 20:06

Ok, I created a template field that creates the link perfectly - How to i get that template field to populate in the HTML Events Handlers (under page properties)? Also, still need to know how to get the page ID # of the last page visited to populate a field called "Last Page Visited" - Seems like i have it worked out after those two issues.

Posted by Admin on 13-Jan-2011 21:23

Before building href you can determine HTTP parameter "p" on current page - that's page ID.

Posted by Admin on 14-Jan-2011 01:44

YOu have an example of how to do this?

Posted by Admin on 14-Jan-2011 02:17

Wouldnt the easiest way be for you to add a field for last page accessed for all users? Like "{!#CURR_USER.lastApplication}" you have for application. That way this functionality could be easily accessed via rollbase instead of custom code? Seems like it should be there.

Posted by Admin on 14-Jan-2011 15:37

Do you mean ID of Rollbase Application? I can do this, but not sure how developers can benefit. This can only be used in templates, and in template you already know your application.

Posted by Admin on 14-Jan-2011 15:57

No the ID of the portal page. It would work the same as the other ID but allow us to que up last page viewed very easily...

Posted by Admin on 14-Jan-2011 17:06

OK, I'll add template token for that.

Posted by Admin on 14-Jan-2011 17:54

You can use {!#PAGE_ID} token.

Posted by Admin on 14-Jan-2011 18:10

great!

Posted by Admin on 14-Jan-2011 23:40

How do you tie that Page ID to the last portal user to access the application? Currently it pulls the last page accessed in that customer regardless of user. I need it to pull the last page ID from the portal user that accessed the portal. Otherwise it is overrided anytime a back end user access that same customer the last page ID changes - I need it tol follow the portal user specifically.

Posted by Admin on 14-Jan-2011 23:50

Would a last portal page visited work? IN stead of general PAGE ID - use portal page ID?

This thread is closed