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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
JSJB
Helper I
Helper I

Implementing FieldPicker formatting setting

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: []
    });

 

3 REPLIES 3
MartinRKrupa
Regular Visitor

Thanks!

JSJB
Helper I
Helper I

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.

 

MartinRKrupa
Regular Visitor

Hi, I'm having the same issue. Anyone's figured out /found any documentation on how to use the FieldPicker?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

Top Solution Authors