cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThomasFoster Established Member
Established Member

Location of documentation on function documentation

I am looking for documentation on what metadata can be set for custom functions using Value.ReplaceMetaData and the Documentation.### items.

 

I havent been able to find anything official from microsoft either in docs.microsoft or using #shared. Does anyone know where this information exists publicly if at all?

6 REPLIES 6
Super User
Super User

Re: Location of documentation on function documentation

ThomasFoster Established Member
Established Member

Re: Location of documentation on function documentation

I have seen that post. What I am more talking about is setting the meta data for the parameters of the function as Chris webb does here 

 

https://blog.crossjoin.co.uk/2014/11/27/specifying-allowed-values-sample-values-and-descriptions-for...

 

I am looking of a full list/documentation on what valid values can be included in documentation both for the function itself but also the parameter. For example one such field that isnt in either chris webbs post or Imke's is Documentation.DefaultValue.

 

What it does is quite obvious but it is very useful yet it seems that neither it or any of the documentation meta data is documented. Various different paramters exist in blog posts but tralling through 5 blog posts is a pain compared to just looking it up in documentation

Super User
Super User

Re: Location of documentation on function documentation

hmm, there is the specification, but I don't think it has the info you're looking for (plus it's from October 2016)
https://msdn.microsoft.com/en-us/query-bi/m/power-query-m-language-specification

if you use the Visual Studio you can try adding the M SDK - the answer may be in #shared/#sections for a new project
https://marketplace.visualstudio.com/items?itemName=Dakahn.PowerQuerySDK

 

Super User
Super User

Re: Location of documentation on function documentation

you can get decent list from #shared - no detailed explanation though
basically I extracted all the unique names of fields of metadata records of #shared

let
    Source = #shared,
    #"Converted to Table" = Record.ToTable(Source),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Record.FieldNames(Value.Metadata([Value]))),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
    #"Expanded Custom" = Table.ExpandListColumn(#"Removed Other Columns", "Custom"),
    #"Removed Duplicates" = Table.Distinct(#"Expanded Custom"),
    #"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each ([Custom] <> null)),
    #"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Custom", Order.Ascending}})
in
    #"Sorted Rows"

if you play a bit you should be able to get the list with examples

Super User
Super User

Re: Location of documentation on function documentation

You might find this page useful as well: https://github.com/Microsoft/DataConnectors/blob/master/docs/function-docs.md

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




ThomasFoster Established Member
Established Member

Re: Location of documentation on function documentation

I did see that linked in your blog post, however I think that what I am looking for just does not exist yet. Hopefully microsoft will make some complete up to date documentation soon