Forum Discussion
Anonymous
3 years agoNot applicable
Pass name of function to a function - NOT as text
Greetings, I am working on a PQ function to pull back the metadata for a chosen function (user generated, or #shared). I am aware I can just as easily click in the box that says Function after r...
- 3 years ago
Anonymous Try this:
( FunctionName as text ) => let SharedLibrary = #shared, ToTable = Record.ToTable ( SharedLibrary ), GetFunction = Table.SelectRows ( ToTable, each [Name] = FunctionName )[Value]{0}, Source = Value.Metadata ( Value.Type ( GetFunction ) ), ConvertToTable = Record.ToTable ( Source ), PivotName = Table.Pivot ( ConvertToTable, List.Distinct ( ConvertToTable[Name] ), "Name", "Value" ), ExpandExamplesToRecord = Table.ExpandListColumn ( PivotName, "Documentation.Examples" ), ExpandExamplesToText = Table.ExpandRecordColumn ( ExpandExamplesToRecord, "Documentation.Examples", { "Description", "Code", "Result" }, { "Documentation.Examples.Description", "Documentation.Examples.Code", "Documentation.Examples.Result" } ) in ExpandExamplesToText
Anonymous
3 years agoNot applicable
You are incredible, AntrikshSharma , thank you so much. It worked as designed, now I need to disect it a little more so I fully understand the modifications you made
AntrikshSharma
3 years agoCommunity Champion
Anonymous Awesome! In that case please mark my answer as the solution. Thanks!