<?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: How can I get RolesIndex from the API? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-can-I-get-RolesIndex-from-the-API/m-p/1672649#M27910</link>
    <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;I would say that if you want a supported way to do this, then it's probably better to &lt;A href="https://github.com/microsoft/powerbi-visuals-api/issues" target="_self"&gt;make a request in the repo for the feature&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;A hacky workaround would be to refer to it explicitly like this, but it's going to get resolved as an &lt;FONT face="courier new,courier"&gt;any&lt;/FONT&gt; type, and you may need to write some safety checks around the object properties in the chain, otherwise your visual will potential experience some unintended side-effects:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;dataViews[0].metadata.columns[i]['roleIndex']['statusImg'][0]&lt;/LI-CODE&gt;
&lt;P&gt;It might be worth stepping back to see if this is absolutely the way to solve what you are trying to do though - perhaps if you can share enough info and code around what you are trying to achieve, along with some sample data then perhaps we can take a look at a more supported approach?&lt;/P&gt;
&lt;P&gt;Ragards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2021 20:02:48 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2021-02-17T20:02:48Z</dc:date>
    <item>
      <title>How can I get RolesIndex from the API?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-can-I-get-RolesIndex-from-the-API/m-p/1669496#M27877</link>
      <description>&lt;P&gt;Hi there, when there are multiple columns mapped in the same fields panel,&amp;nbsp; like that&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;in the metadata -&amp;gt; columns -&amp;gt; rolesIndex&amp;nbsp; a vector is created containing the index of each field&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;But in the interface of the API this not acessible. I checked the DataViewUtils (&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/utils-dataview" target="_blank" rel="noopener"&gt;Introduction to use Data view utils in Power BI visual in Power BI embedded analytics for better embedded BI insights - Power BI | Microsoft Docs&lt;/A&gt;) , but its just help to find the specific role in different fields.&lt;BR /&gt;&lt;BR /&gt;How i get that specific property named rolesIndex in my code?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;P&gt;Gabriel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 14:25:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-can-I-get-RolesIndex-from-the-API/m-p/1669496#M27877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-16T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get RolesIndex from the API?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-can-I-get-RolesIndex-from-the-API/m-p/1672649#M27910</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;I would say that if you want a supported way to do this, then it's probably better to &lt;A href="https://github.com/microsoft/powerbi-visuals-api/issues" target="_self"&gt;make a request in the repo for the feature&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;A hacky workaround would be to refer to it explicitly like this, but it's going to get resolved as an &lt;FONT face="courier new,courier"&gt;any&lt;/FONT&gt; type, and you may need to write some safety checks around the object properties in the chain, otherwise your visual will potential experience some unintended side-effects:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;dataViews[0].metadata.columns[i]['roleIndex']['statusImg'][0]&lt;/LI-CODE&gt;
&lt;P&gt;It might be worth stepping back to see if this is absolutely the way to solve what you are trying to do though - perhaps if you can share enough info and code around what you are trying to achieve, along with some sample data then perhaps we can take a look at a more supported approach?&lt;/P&gt;
&lt;P&gt;Ragards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 20:02:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-can-I-get-RolesIndex-from-the-API/m-p/1672649#M27910</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-02-17T20:02:48Z</dc:date>
    </item>
  </channel>
</rss>

