none
Documentation.FieldDescription disappears RRS feed

  • Question

  • It's probably a bug, but maybe not and someone can share a workaround here:

    The field description works as advertised if used like this:

    let
    myFunction = (myText as text) => myText,
    myType = type function (myText as (type text meta [
                                Documentation.FieldCaption = "Input MyText",
                                Documentation.FieldDescription = "Some detailled description here",
                                Documentation.AllowedValues = {"Day", "Week", "Month", "Quarter", "Year"}
                                ])) as text
    
    //ReplType = Value.ReplaceType(myFunction, myType) - This will not work at all
    in
    Value.ReplaceType(myFunction, myType)

    but once the documentation on function-level comes into play, it disappears (unlike FieldCaption and AllowedValues, who still work fine):

    let
    myDocumentation = [Documentation.Name =  " My.Function"],
    myFunction = (myText as text) => myText,
    // myDocumentedFunction = Value.ReplaceMetadata(myFunction, myDocumentation),
    myType = type function (myText as (type text meta [
                                Documentation.FieldCaption = "Input MyText",
                                Documentation.FieldDescription = "Some detailled description here",
                                Documentation.AllowedValues = {"Day", "Week", "Month", "Quarter", "Year"}
                                ])) as text meta myDocumentation
    
    
    in
    Value.ReplaceType(myFunction , myType)

    Does anyone know a trick how to get this going?

    Thanks and cheers, Imke


    Imke Feldmann - MVP Data Platform (PowerBI) - http://www.TheBIccountant.com 

    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful - Thanks!

    Thursday, January 25, 2018 9:01 AM
    Moderator

Answers