Importing records in csv - one field has text with a number of elements, separated by commas. I'd like to make these elements themselves as fields. Any suggestions?
you will have to write a script that...
go to right layout if not already there
shows all records
if more than 0 records.
go to first record
process the csv field into new records
this will probably involve another loop to parse all of the values
go to next record - exit at last
Do you have many records in the csv field, as coherentkris thought, or only fields with a record? In other words, does the csv field contain line breaks?
CSV means "comma separated values". Ordinarily, that comma delimiter means that importing the data into FileMaker via the Import records menu option or script step will but each value separated by a comma into a different field. The row of text (each row separated by a return) will make up a single record in FileMaker after the import.
There can be format issues that keep this from working this way, but that's the first, simplest option to explore.
I guess the csv have data like
then need to be imported to 5 fields.
Exactly as user19752 describes - "a","b,c,d,","e" - I want the b,c,d to be separate fields.
Thanks for all suggestions - it looks as if I need to pull this field out and loop it around to split it.
If there is no line break in it, auto-enter calculation also would do it, like
GetValue ( Substitute ( secondFieldInExample ; "," ; ¶ ) ; 2 )
to get "c" etc.
But it should calculate only on import, so using another temporary table may be better.
Retrieving data ...