Forum Discussion

e17aguilar's avatar
e17aguilar
Frequent Visitor
8 years ago
Solved

Using parameters in advanced editor

  I'm wondering if I can replace a piece of code in the advanced editor with a parameter that contents the same piece of code on text value. For example, if I want to change the type of each column:...
  • v-yulgu-msft's avatar
    8 years ago

    Hi e17aguilar,

     

    I don't think above attemption is achievable.

     

    As you can see, the supported data type by Query Parameter are normal ones. 

     

    But, many times, the items wrapped by Power Query function are not listed in above data types. In your example, the second argument in Table.TransformColumnTypes function should be List type. While the value ({{""Etap"", Int64.Type}, {""Ser."", Int64.Type}, {""Bloq"", Int64.Type}}) you passed by parameter was forced to Text. They are not matched, hence caused errors. Especially, the long text wrapped by "{ }" cannot be passed as a parameter value.

     

    Regards,

    Yuliana Gu