Assign data to a field from a csv file

I have seen several references here in this forum where choice-lists are loaded from csv files. I have seen several examples but can’t really figure out how to query a csv file to get and assign data to a field. To be specific, I don’t understand what “.map", ".chain” etc mean. I did not find anything in documentation that would explain the callback functions and how they work. Will be helpful is someone can shed more light on what these functions are and how they are to be used to get data from a csv. Thanks.

Hi @Mandy_Sin!

Good point that these are not well documented. If what you want to do is achieve something similar to the examples (say, the regions example), I would advise swapping out region for whatever you need in the callback and csv. This kind of substitution is how I initially got my first csvs to work.

Underlying all of this are (I think…) javascript libraries full of different functions. For example, I think this describes map JavaScript Array map() Method
I agree we could improve on the explanation of the examples, but in general there are a whole host of different JavaScript functions that could be used, so if you are curious about a particular function, you can look it up in JavaScript documentation (this strategy is, for example, how I figured out how to randomly sample from a range).