Forum Discussion
Anonymous
6 years agoNot applicable
How to add documentation to custom functions in Power Query Custom Connector?
HI. I'm building a custom connector for Power BI, and I'd like to add documentation to my custom functions. I have read the official documentation and a few blog posts about this. I can't see what is...
- 6 years ago
Here is a sample of a more complete connector:
FunctionType = let paramType = type text meta [ Documentation.FieldCaption = ... ], t = type function (param as paramType) as table in t meta [ Documentation.Description = ..., Documentation.DisplayName = ..., Documentation.Caption = ..., Documentation.Name = ..., Documentation.LongDescription = ..., Documentation.Examples = {[ Description = ..., Code = ..., Result = ... ]} ],
artemus
6 years agoMicrosoft Employee
The metadata belongs on the type of the function, not on the value of the function. Use Value.RaplaceType to do this.
Anonymous
6 years agoNot applicable
shared CustomConnector.GetFunction2 = Value.ReplaceType(GetFunction2 , GetFunction2Type);
You mean like this or another way?
- artemus6 years agoMicrosoft Employee
Oh I see, I think the [DataSource.Kind = ...] is overriding the metadata you already have. You should be able to just append it to your current metadata:
[
DataSource.Kind = "CustomConnector",
Documentation.Name = "GetFunction2",
...
]
shared CustomConnector.GetFunction2 = GetFunction2- artemus6 years agoMicrosoft Employee
Actually scratch that, just add
Documentation.Descriptionto your origional solution- Anonymous6 years agoNot applicable
I did, but it still doesn't work. I replaced "Documentation.LongDescription" with "Documentation.Description" but it still shows like this: