Forum Discussion

ethanmgomes's avatar
ethanmgomes
New Contributor II
2 years ago

Hardcode value in column when loading CSV

Hello, Im wondering if there is a way to hardcode a fieldtoken value when loading data from a csv. For example, I am using the below code: Dim fieldTokens As New List(Of String) fieldTokens.Add("x...
  • ethanmgomes's avatar
    ethanmgomes
    2 years ago

    Hey db_pdx,

    Your response was helpful! I had to change the format to get the default value to load correctly. I was able to get it to work by using 1 semi-colon, and by removing the square brackets from defaultValue. See below for example:

    xfText#:[FieldHeader]:DefaultValue

     

    One important point to note, there must be a column header for the field that you are trying to hardcode. I had to name the column as "EmpID" in my csv for the defaultValue to catch. If I left it as a blank column (even if it's the last column in the csv), then the defaultValue would not populate.

     

    Thank you for your help,

    Ethan