Forum Discussion
Record.TransformFields error
- 1 year ago
Hello, Mic1979 first of all, what problem are you trying to solve: the one in #1 or #6? I am lost. Lets take #6 (the one with tables). You are using wrong function/approach to transform column(s) values. Why Table.TransformRows and Record.TransformFields? There is Table.TransformColumns function.
I suggest that using record + Record.FieldOrDefault for a replacements is the "structure" you are talking about. Nothing wrong with it. It's the way you choose to apply it looks strange to me.
Okay, so be it - it's your decision. In my last message I just pointed out that list of column names (or list of single column name) should not be passed as table[column] as you suggested but as {"name1", "name2"} etc. Then you can easily setup transformations for Table.TransformColumns in the form of {{"name1", function1}, {"name2", function2}}
And even your current code works just fine if you pass {"Region"} instead of Starting_Table[Region] as you did.
Your Record.TransformFields function requires a column name as text for the second parameter, but you have a list instead. Try using just "Region"... instead of {"Region",...}
--Nate
Yup im wrong.