Hello, I have been working towards mapping some CSVs into one of my bases using the Scripting Block. Since I’m new to JavaScript, I’ve been using a lot of the documentation within the Scripting Block, which has been super helpful for what I need.
One issue I have run into is during the mapping process, where I’m mapping the fields in my Base to the fields within my CSV.
The format of mapping a field for me generally looks like this:
data.FieldName
Where “data” represents the parsed contents of my file and “FieldName” represents the name of the field within that file. My issue is that, in some of the files I would like to use, there are special characters and spaces within the names of the fields. Meaning I would like have a mapping that might look something like this:
data.Field Name #
For spaces, I attempted to use underscores but wasn’t able to get that to work. When using a special character like # or /, I get errors thrown by the script.
From my understanding, I believe this mapping process uses something called identifiers which exclude certain characters (such as #s, /s, and spaces). My question is whether or not there is a way to include those spaces and special characters that will work with my script? My other option would be changing the fields w/i the CSV, but ideally, I would like my script to handle this issue.
Any help is greatly appreciated. Thank you.