Forum Discussion

smpa01's avatar
smpa01
Community Champion
3 years ago
Solved

Assiginng Record Field Name Dynamically

Is it posible to assign the Record Field name dynamically. I am currently getting an error. let fieldName = {"a","b"}, src=[fieldName{0}=1,fieldName{1}=2] in src     Alexis...
  • AlexisOlson's avatar
    3 years ago

    How about this?

    let
        fieldNames = {"a","b"},
        src=Record.FromList({1,2}, fieldNames)
    in
        src