Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi - I'm working on building a custom connector with the SDK.
For nav tables that contain functions - is there a way to allow users to enter values for required parameters at the first data preview dialog? I get a 'Parameter value not specified' message, but no place where I can enter a parameter in this dialog. Thanks!
Solved! Go to Solution.
I found a solution in this very excellent reference SDK project:
https://github.com/migueesc123/PowerBIRESTAPI
focusing in on the 'functions' nav table has exactly what I was looking for:
Hoping this saves sometime time in the future... I spent days trying to figure this out and finally this saved me.
I found a solution in this very excellent reference SDK project:
https://github.com/migueesc123/PowerBIRESTAPI
focusing in on the 'functions' nav table has exactly what I was looking for:
Hoping this saves sometime time in the future... I spent days trying to figure this out and finally this saved me.
To allow users to enter values for required parameters in a custom connector using the Power BI SDK, you can use the setDefaultValue method on the DataParameter object in your DataSource.ts file. This allows you to set a default value for the parameter that the user can then change in the first data preview dialog.
Here's an example:
const myParameter: DataParameter = {
name: "My Parameter",
dataType: DataType.String,
};
myParameter.setDefaultValue("Default Value");
this.dataSource.dataParameters.push(myParameter);
In this example, the parameter myParameter is created with a name of "My Parameter" and a data type of DataType.String. The setDefaultValue method is then used to set the default value of the parameter to "Default Value". Finally, the parameter is pushed onto the dataSource.dataParameters array.
This will display a prompt for the user to enter a value for the parameter when they click "Load Data" in the first data preview dialog.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |