M icon indicating copy to clipboard operation
M copied to clipboard

Text.RemoveHtmlTags returns error if input HTML is null

Open Mike-Honey opened this issue 7 years ago • 1 comments

Text.RemoveHtmlTags returns an error if the input HTML is null.

Expression.Error: We cannot convert the value null to type Text.
Details:
    Value=
    Type=Type

The best workaround I could come up with is to call the function wrapped in an if statement, e.g. for a Calculated Column:

if [myHTML] = null then null else fnTextRemoveHtmlTags ( [myHTML] )

Mike-Honey avatar Oct 31 '18 13:10 Mike-Honey

Sorry Mike, just recognized your message here. If I'm not mistaken, this error has just been fixed by the pull request from Mike Carlo: https://github.com/ImkeF/M/pull/3 Is that correct? Cheers, Imke

ImkeF avatar Oct 19 '19 04:10 ImkeF