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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

Hi @Anonymous 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.