<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with hyperlink click behavior in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1770269#M28815</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Out of curiosity I tried the discussed options and they do not seem to work as per the docs. I wonder if there is something missing and if someone managed to implement this functionality in general or this is an issue with the JS library.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 15:10:02 GMT</pubDate>
    <dc:creator>egr</dc:creator>
    <dc:date>2021-04-06T15:10:02Z</dc:date>
    <item>
      <title>Issue with hyperlink click behavior</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1754665#M28694</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I am trying to change the default hyperlink click behavior in a table visual.&lt;BR /&gt;I am doing it as described here: &lt;A href="https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#hyperlink-click-behavior" target="_self"&gt;https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#hyperlink-click-behavior&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am trying to change the behavior from 0 - "Navigate", to 1 - "NavigateAndRaiseEvent " or 2 - "RaiseEvent" with no success.&lt;BR /&gt;It continues to behave like "Navigate" is selected. When clicking on a link inside of a table visual in a report&amp;nbsp;a new tab is opened in the browser and the provided URL is opened, but no event is dispatched.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did any of you try to change the default behavior of a URL in the table visual in a report?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is some sample code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var config = {
		....
		settings: {
			hyperlinkClickBehavior: window['powerbi-client'].models.HyperlinkClickBehavior.RaiseEvent
			}
		};
		
var report = powerbi.embed(embedContainer, config);

report.on('dataHyperlinkClicked', function(event) {
                console.log('dataHyperlinkClicked', arguments);
            }); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 12:40:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1754665#M28694</guid>
      <dc:creator>HeyYa1</dc:creator>
      <dc:date>2021-03-30T12:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with hyperlink click behavior</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1758786#M28731</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/293567"&gt;@HeyYa1&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;How you try to remove the '&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="auto" data-phrase-index="0"&gt;&lt;SPAN&gt;Prefix'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; of 'HyperlinkClickBehavior'? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;According to the document, it seems to used an enum value and not used the parent parts. You can try to use the below code if it helps:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var config = {
		....
		settings: {
			hyperlinkClickBehavior: HyperlinkClickBehavior.RaiseEvent,
			}
		};
var report = powerbi.embed(embedContainer, config);

report.on('dataHyperlinkClicked', function(event) {
                console.log('dataHyperlinkClicked', event.arguments);
            }); &lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 02:55:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1758786#M28731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-01T02:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with hyperlink click behavior</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1770269#M28815</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Out of curiosity I tried the discussed options and they do not seem to work as per the docs. I wonder if there is something missing and if someone managed to implement this functionality in general or this is an issue with the JS library.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 15:10:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1770269#M28815</guid>
      <dc:creator>egr</dc:creator>
      <dc:date>2021-04-06T15:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with hyperlink click behavior</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1771699#M28824</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/293577"&gt;@egr&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I copied the sample code for Power BI Embedded Playground and add the hyperlink click events.&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;You can replace variables and try it if helps:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;// Read embed application token from textbox
var txtAccessToken = 'token';

// Read embed URL from textbox
var txtEmbedUrl = 'url';

// Read report Id from textbox
var txtEmbedReportId = 'id';

// Read embed type from radio
var tokenType = 'type';

// Get models. models contains enums that can be used.
var models = window['powerbi-client'].models;

// Embed configuration used to describe the what and how to embed.
// This object is used when calling powerbi.embed.
// This also includes settings and options such as filters.
// You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
var config = {
    type: 'report',
    tokenType: tokenType == '0' ? models.TokenType.Aad : models.TokenType.Embed,
    accessToken: txtAccessToken,
    embedUrl: txtEmbedUrl,
    id: txtEmbedReportId,
    permissions: models.Permissions.All /*gives maximum permissions*/ ,
    viewMode: models.ViewMode.Edit,
    settings: {
        panes: {
            filters: {
                visible: true
            },
            pageNavigation: {
                visible: true
            }
        },
        hyperlinkClickBehavior: models.HyperlinkClickBehavior.RaiseEvent
    }
};

// Get a reference to the embedded report HTML element
var embedContainer = 'container';

// Embed the report and display it within the div container.
var report = powerbi.embed(embedContainer, config);

// Report.off removes a given event handler if it exists.
report.off("loaded");

// Report.on will add an event handler which prints to Log window.
report.on("loaded", function() {
    console.log("Report loaded","Loaded");
});

// Report.off removes a given event handler if it exists.
report.off("rendered");

// Report.on will add an event handler which prints to Log window.
report.on("rendered", function() {
    console.log('Event Rendered',"Rendered");
});

report.off("error");
report.on("error", function(event) {
    console.log('Error', event.detail);
});

report.on('dataHyperlinkClicked', function(event) {
    console.log('dataHyperlinkClicked', event.detail);
});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 08:14:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issue-with-hyperlink-click-behavior/m-p/1771699#M28824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-07T08:14:57Z</dc:date>
    </item>
  </channel>
</rss>

