March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
In custom visual :
When i publish report, how persist or get text
to input how to custom visual Text toFilter does?
For now the filters are applied.
thanks
Solved! Go to Solution.
Don't call this.visualHost.persistProperties in enumerateObjectInstances method since such implementation might cause an infinite update loop if Format Panel is opened.
Are there any exceptions? Can you share the embedded Power BI report to debug it?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
To keep data in Power BI you should define a property in objects property of capaiblities.json (documentation).
After that call persistProperties to send settings to Power BI host.
As a result the saved data will be in objects object of metadata.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Hi ,
thanks your reply.
I folowed this steps but in sandbox mode works well, but when package this visual not works. why?
Help me pls.
my code:
Capabilities
"objects": { "settings": { "properties": { "config": { "type": { "text": true } }, "show": { "type": { "bool": true } } } }, "general": { "displayName": "General", "displayNameKey": "formattingGeneral", "properties": { "selection": { "displayName": "Selection", "type": { "text": true } }, "filter": { "type": { "filter": true } },
method Update:
this.values = JSON.parse(getValue(this.dataView.metadata.objects, "settings", "config", "No items")); let items=""; this.values.forEach(element => { items+=element+"\n"; }); $("#q").val(items);
Enumerate:
public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject { // return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options); let objectName = options.objectName; let objectEnumeration: VisualObjectInstance[] = []; this.visualHost.persistProperties(<VisualObjectInstancesToPersist>{ merge: [{ objectName: "settings", selector: null, properties: { config: JSON.stringify(this.values) || "{}", show:true } }] }); return objectEnumeration; }
DataView :
Don't call this.visualHost.persistProperties in enumerateObjectInstances method since such implementation might cause an infinite update loop if Format Panel is opened.
Are there any exceptions? Can you share the embedded Power BI report to debug it?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
8 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
6 | |
3 | |
3 | |
2 | |
2 |