Customizing Hyperlink Behavior in PI Vision Asset Comparison Tables
Learn how to modify PI Vision 2019 to open hyperlinks within the same tab for a seamless user experience.
Roshan Soni
Opening hyperlinks in the same tab can be particularly useful when working with PI Vision's asset comparison tables, as it provides a more integrated user experience by maintaining context within the same browser window. By default, PI Vision may be configured to open these links in a new tab, which can sometimes disrupt the workflow for users who prefer a unified browsing session.
Solution for PI Vision 2019
If you're using PI Vision 2019 and wish to change this behavior, you can adjust the settings directly in the JavaScript file that manages the asset comparison table. Here’s how you can do it:
-
Locate the Script File: Navigate to the directory where your PI Vision scripts are located. By default, this is typically:
PI Vision\PIVision 2019\Scripts\app\editor\symbols\ -
Edit the Correct File: Find the
PIVisualization.sym-asset-comparison-table.jsfile. This file contains the necessary code for managing the hyperlink behavior in asset comparison tables. -
Modify Hyperlink Behavior: Inside this file, locate the function named
launchHyperlink. The function should look something like this:launchHyperlink: function(link) { if (!scope.layoutMode) { scope.$emit('openHyperlink', { URL: link, newTab: true }); } } -
Change Tab Setting: Change the
newTab: truesetting tonewTab: false. By doing this, you instruct the function to open links in the same tab rather than spawning a new one.launchHyperlink: function(link) { if (!scope.layoutMode) { scope.$emit('openHyperlink', { URL: link, newTab: false }); } }
Important Considerations
-
Apply Changes Post-Upgrade: Keep in mind that if you upgrade your version of PI Vision, you will likely have to redo this adjustment. Each version update can overwrite script files with newer versions, removing your custom settings.
-
Testing After Changes: After making this change, it's a good practice to thoroughly test this functionality within your PI Vision setup to ensure that it behaves as expected and doesn’t introduce any new issues.
-
Update for New Versions: If newer versions of PI Vision introduce ways to set this preference without modifying script files—or if existing properties or settings cover your use case—it’s a good idea to consult the latest PI Vision documentation or reach out to technical support.
By following these steps, you can customize the behavior of hyperlinks in PI Vision asset comparison tables, promoting a seamless navigation experience for your users. As OSIsoft continues to enhance PI Vision, staying updated on the latest features and customization options will further ensure that your implementations are both efficient and robust.
Tags
About Roshan Soni
Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.
No comments yet
Be the first to share your thoughts on this article.
Related Articles
Developing Expertise in PI System and Related Technologies: A Comprehensive Training Roadmap
This blog outlines a comprehensive training roadmap for developing expertise in the PI System and related technologies. Structured over four weeks, the program covers essential technologies like the PI System, Asset Framework, and various APIs, providing a strong foundation for data management and analytics.
Roshan Soni
Traversing an AF Database Hierarchy to Count All Elements Using OSIsoft AF SDK
Learn how to use the OSIsoft AF SDK in C# to traverse an AF database and count all elements within its hierarchy. This blog post provides a comprehensive guide with code examples for connecting, traversing, and counting AF elements.
Roshan Soni
A Beginner's Guide to Learning the OSIsoft PI System
Unlock the power of real-time data management and analytics with OSIsoft PI System. This beginner's guide provides a structured learning path and key resources to help you effectively learn the PI System.
Roshan Soni