Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vyshnav4u
Frequent Visitor

How to add toggle in format pane dynamically

Hi, I'm developing a custom visual, where I want to show multiple toggle in formatpane based on user input(data field),
ie; if data field have one colum only one toggle should be shown, if another column is addeed new toggle will added for that.

I'm able to partially achive this by modifying enumerateObjectInstances() function

 
for (let i = 0; i < 5; i++) {
              objectEnumeration.push({
                objectName: objectName,
                displayName: "sample"+i,
                selector: null,
                properties: {
                    firstProp: this.settings.myObj.firstProp,
                },
              });
}

which give something like this
vyshnav4u_0-1664211644874.png

 

the problem is, if I change the first toggle the rest of toggle also chaning, I'm not sure how a I should save it to settings.



1 REPLY 1
v-yetao1-msft
Community Support
Community Support

Hi @vyshnav4u 

Can you provide your pbix file(remove sensitive info) for me to test your problem ?

 

Best Regards,
Community Support Team _ Ailsa Tao

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors