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("xfText#:[Account]")
fieldTokens.Add("xfText#:[Entity]")
fieldTokens.Add("xfText#:[Amount]")
fieldTokens.Add("xfText#:[EmpID]") '<-- Want to hardcode this to '99999'
BRApi.Utilities.LoadCustomTableUsingDelimitedFile(si, .......)
But I want to hardcode the results of EmpID to value '99999' before I execute the 'LoadCustomTableUsingDelimitedFile' command.
Any help on this would be much appreciated!
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