Forum Discussion

computasian's avatar
computasian
New Member
2 years ago
Solved

custom function disobeying my data type declaration

Hello PBI folk,   I have a custom function that takes a text string of numeric digits as input and is supposed to return it as a text string, but when I look at the new column, it's showing as data...
  • AlexisOlson's avatar
    2 years ago

    Does it help if you add ", type text" before the last parenthesis that closes Table.AddColumn?

  • computasian's avatar
    computasian
    2 years ago

    Hi Alexis,

    thanks for your response and, while it wasn't the solution, it put me on the right track to fix it.

    You'll notice the function name (9DigitContractID) didn't match the function call in the step (CleanContractNumber), so I was calling the wrong function all the time! 

    So, fixed after staring at this thing for about a half-hour.

    THANKS