Skip to main content
Tech
Engineering
Data Visualization

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

3 min read

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:

  1. 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\
    
  2. Edit the Correct File: Find the PIVisualization.sym-asset-comparison-table.js file. This file contains the necessary code for managing the hyperlink behavior in asset comparison tables.

  3. 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 });
      }
    }
    
  4. Change Tab Setting: Change the newTab: true setting to newTab: 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

#PI Vision
#hyperlink
#asset comparison
#JavaScript
#customization

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.

Sign in to comment

Join the conversation by signing in to your account.

Comments (0)

No comments yet

Be the first to share your thoughts on this article.

Related Articles

Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead

A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.

Roshan Soni

Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB

Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.

Roshan Soni

Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?

Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.

Roshan Soni

    Customizing Hyperlink Behavior in PI Vision Asset Comparison Tables | Pisharp Blog | PISharp