The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
How do you implement the FieldPicker formatting setting in a project? I am having severe issues with it, and I can't find a single example anywhere of an implementation of it (in code).
This is my current set-up. I have tried to make it as basic as possible but the only value I get when implemented and adding a data field is "[Object object]" (as an actual string value).
Capabilities:
"DropdownDataFields":{
"type": {
"text": true
}
}
(note, I have tried both "numeric", "integer", "text", "bool" and "enumeration: []")
Setting:
public dataFields: formattingSettings.FieldPicker = new formattingSettings.FieldPicker({
validators: {},
name:"DropdownDataFields",
value: []
});
Thanks!
Hello @MartinRKrupa, while I had no luck figuring out how to do it (if it's even possible), I did find a workaround. VisualEnumerationInstanceKinds allows users to add measures as values for settings in PowerBI Custom Visuals via Conditional Formatting.
It's not perfect, but it might be possible for you to achieve something similar.
public fontColor: formattingSettings.ColorPicker = new formattingSettings.ColorPicker({
name: 'fontColor',
displayName: 'Text color',
instanceKind: VisualEnumerationInstanceKinds.ConstantOrRule,
value: {
value: ''
}
});
The above example is a simple color picker example. Using the VisualEnumerationInstanceKinds.ConstantOrRule, users get the f(x) icon next to the setting and can set it to a measure (although in this case the output should be a hex color code). With this, users can easily define their own dynamic values for color style, e.g. for a "dark mode".
Most formattingSettings I have seen allow the instanceKind property.
Hi, I'm having the same issue. Anyone's figured out /found any documentation on how to use the FieldPicker?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
3 | |
2 | |
1 | |
1 |