<?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 Dynamically generate enumeration object in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/344962#M667</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on custom visual and I want to generate values of enumeration object dynamiclly bassed on measures name. below is my object structure in capabilities.json file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"formatSettings": {
            "displayName": "Format Measures",
            "properties": {
                "measureLists":{
                    "displayName": "Measures List",
                    "type": {
                        "enumeration": []
                    }
                }
            }
        }&lt;/PRE&gt;&lt;P&gt;I tried adding dynamic values in enumeration object with below code but it is not working.&lt;/P&gt;&lt;PRE&gt;public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] 
        | VisualObjectInstanceEnumerationObject {
            let settings: VisualObjectInstance[] = (VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options) as VisualObjectInstanceEnumerationObject).instances;
            console.log(settings);
            switch(options.objectName){
                case "formatSettings":{
                    settings.push({
                        objectName: options.objectName,
                        properties:{
                            measureList: ['test', 'test2']
                        },
                        selector: null
                    });
                }
            }
            return settings;
        }&lt;/PRE&gt;&lt;P&gt;I am unable to find proper documentation regarding how to achive this. If someone has successfully implemented this, please share the solution with me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2018 03:46:21 GMT</pubDate>
    <dc:creator>bobmarley</dc:creator>
    <dc:date>2018-01-25T03:46:21Z</dc:date>
    <item>
      <title>Dynamically generate enumeration object</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/344962#M667</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on custom visual and I want to generate values of enumeration object dynamiclly bassed on measures name. below is my object structure in capabilities.json file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"formatSettings": {
            "displayName": "Format Measures",
            "properties": {
                "measureLists":{
                    "displayName": "Measures List",
                    "type": {
                        "enumeration": []
                    }
                }
            }
        }&lt;/PRE&gt;&lt;P&gt;I tried adding dynamic values in enumeration object with below code but it is not working.&lt;/P&gt;&lt;PRE&gt;public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] 
        | VisualObjectInstanceEnumerationObject {
            let settings: VisualObjectInstance[] = (VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options) as VisualObjectInstanceEnumerationObject).instances;
            console.log(settings);
            switch(options.objectName){
                case "formatSettings":{
                    settings.push({
                        objectName: options.objectName,
                        properties:{
                            measureList: ['test', 'test2']
                        },
                        selector: null
                    });
                }
            }
            return settings;
        }&lt;/PRE&gt;&lt;P&gt;I am unable to find proper documentation regarding how to achive this. If someone has successfully implemented this, please share the solution with me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 03:46:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/344962#M667</guid>
      <dc:creator>bobmarley</dc:creator>
      <dc:date>2018-01-25T03:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically generate enumeration object</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/345143#M674</link>
      <description>&lt;P&gt;Dynamic enumerations are not supported yet.&lt;/P&gt;&lt;P&gt;We'll update this thread once it's supported (not ETA so far).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ignat Vilesov,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 09:00:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/345143#M674</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-01-25T09:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically generate enumeration object</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/628049#M1800</link>
      <description>&lt;P&gt;Is there any update on this? I see this works fine on the inbuilt visuals.. This feature would be great to have, especially when trying to change properties per element. Is there any workaround you would recommend currently?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 17:51:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/628049#M1800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-20T17:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically generate enumeration object</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/628727#M1803</link>
      <description>&lt;P&gt;There's no workaround for this issue. It's on backlog but there's no ETA because it will require a very redesign in how Power BI handles capabilities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 10:18:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/628727#M1803</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2019-02-21T10:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically generate enumeration object</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/753197#M2396</link>
      <description>&lt;P&gt;If this feature isn't supported and there's no ETA, why is there a tutorial document for it?&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/DataBoundObjects.md" target="_blank"&gt;https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/DataBoundObjects.md&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 20:24:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/753197#M2396</guid>
      <dc:creator>scriptpup</dc:creator>
      <dc:date>2019-07-30T20:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically generate enumeration object</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/753224#M2397</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/157903"&gt;@scriptpup&lt;/a&gt;&amp;nbsp;- this is not quite the same thing.&amp;nbsp;You have always been able to generate properties at the top-level using the technique linked in the example.&lt;/P&gt;&lt;P&gt;The question is referring to dynamically changing the values in properties with dropdown values (enumerations). A use case for this is where you might have multiple measures in your visual and you want to have dynamic selection of properties, for example, in the the core matrix visual's &lt;EM&gt;Field formatting&amp;nbsp;&lt;/EM&gt;menu, e.g.:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 221px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/181352i9828F17B3D1E3185/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Each entry has its own distinct set of properties that show/hide based on the selected measure.&lt;/P&gt;&lt;P&gt;These have to be manualy defined in custom visuals and cannot work dynamically like the above.&lt;/P&gt;&lt;P&gt;A lot of us would really like this feature, and have used the article you've linked as a (somewhat undesirable) workaround in some cases.&lt;/P&gt;&lt;P&gt;I hope that this clarifies the question OP is asking.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 21:04:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Dynamically-generate-enumeration-object/m-p/753224#M2397</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-07-30T21:04:14Z</dc:date>
    </item>
  </channel>
</rss>

