Rouzi Bai Posted February 21, 2019 Share Posted February 21, 2019 Hi everyone, I have aspotfiredashboard with over 60 pages, and each page has a "employee details" button that will bring the user to see the employee details after marking. However, people always get lost and forget which page they were at before. Is there a way to always bring the users to where they were at I know how to insert action control to bring people back to a specific page, but in this case, people can be at different pages, should I use JavaScript in the text area for this situation Please let me know your thoughts! Great thanks, Rosie Link to comment Share on other sites More sharing options...
B I Posted February 22, 2019 Share Posted February 22, 2019 You can change the page navigation to "history arrows" (Edit > Document Properties > General > Page navigation). Pressing "back" will take you back through the history of your pages. If you are creating buttons in IronPython to navigate through the document then when you go to a new page you can write the "origin" page number to a document property. A button can be added on each page saying, "go back" and that will navigate to the page number that you were last on. This solution will only work for going back one step though. I've drafted some IronPython below, it may need some tweaking. #THIS IS THE BUTTON THAT WILL NAVIGATE TO YOUR NEXT PAGE #Record this current page in an integer document property called "LAST_PAGE" Document.Properties["LAST_PAGE"] = Document.Pages.IndexOf(Document.ActivePageReference) #Navigate to new page (this will take you to the second page) Document.ActivePageReference = Document.Pages[1]#THIS IS THE BUTTON THAT WILL NAVIGATE BACK TO THE PREVIOUS PAGE #Save the document with LAST_PAGE document property = -1 so that you can identify when the page has not changed lastPage = Document.Properties["LAST_PAGE"] if lastPage -1: #navigate to last page Document.ActivePageReference = Document.Pages[lastPage] #update last page back to initial state (= -1) so that the button will not do anything once you've gone back lastPage = -1 Link to comment Share on other sites More sharing options...
Rouzi Bai Posted February 22, 2019 Author Share Posted February 22, 2019 Great thanks, I will take the first suggestion, since I am not farmiliar with Python. But this is very helpful! Rosie Link to comment Share on other sites More sharing options...
Rouzi Bai Posted February 22, 2019 Author Share Posted February 22, 2019 I just noticed that if i change the Page Navigation to "History Arrows" , then the forward arrow doesn't work, butI also want to make sure that users can move to next page. Link to comment Share on other sites More sharing options...
B I Posted February 25, 2019 Share Posted February 25, 2019 In that case, you need to build buttons to navigate between pages and also leave the History arrows exposed at the top of the analysis. You can either create the buttons through IronPython, as detailed in my previous reply, or use the built in Actions in Spotfire (details below): In text area: Right click > Edit text area Insert Action Control (button with the exclamation mark on it) Actions > Pages and Visualizations > choose the page to which you want that button to take you Users can then use the navigation buttons you created to go "forward" and the history arrows to return. Link to comment Share on other sites More sharing options...
Rouzi Bai Posted February 25, 2019 Author Share Posted February 25, 2019 The thing is users can be at any page, and I want them to go back to whereever they made the markings. Thanks, Rosie Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now