Renaming columns

Comments

2 comments

  • Avatar
    Adrian Williams

    Hi Martin,

    The issue is that the input field specification is a hybrid of two possible formats. Dataverse allows the field metadata to be specified using:

        out1.MyOutputField = in1.FieldName

    where 'FieldName' does not conflict with a Python keyword and does not contain space characters, or

        out1.MyOutputField = in1['Field Name']

    In your situation in1.[1]  should be  in1['1']  - i.e. there is no period '.' character before the opening square bracket. Note also the use of apostrophes around the field name as the field name is a string in this case.

    In addition you can use a variable in the specification, e.g.

        RequiredField = '1'

        out1.MyOutputField = in1[RequiredField]

     

    Best regards,

    Adrian

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    You may also be interested in the 'Rename Fields' Community custom node here:

    https://lavastorm.zendesk.com/hc/en-us/community/posts/115001574994-Rename-Fields-Custom-Node


    0
    Comment actions Permalink

Please sign in to leave a comment.



Powered by Zendesk