Blank value for selected field when importing csv

Looks like the GitHub search hit an error on fetching issues specifically about CSV import blank values on select fields. No worries—this one’s common enough in Mautic circles to unpack without fresh bug reports.

Here’s the gist: When importing CSV files into Mautic, sometimes select (dropdown) fields come through blank for some rows, even when the CSV clearly shows a value. The original poster with 40k rows saw about 300 where the “bundesland” (German state) field cleared out mysteriously. This usually isn’t about encoding or trailing spaces, and even umlauts aren’t the main culprit since non-umlauted values misbehaved too.

Why does this happen? Mautic expects select field values to match *exactly* what’s predefined in your field options. The smallest mismatch—extra spaces, hidden characters, case differences—can make Mautic discard the value and leave it blank. If your CSV has variants or alternate spellings not in the select options, those rows get nada for that field.

The user even considered mucking with Mautic’s code, but here’s a shortcut: Before importing, export your select field values directly from Mautic. Use those exact values in your CSV—no guessing. Make sure the CSV cells are clean: no invisible whitespace, no special characters sneaking in, and definitely no mismatch in letter case if your field is case-sensitive.

A few tips from community wisdom:

– Convert your CSV encoding to UTF-8 without BOM for best results.
– Open the CSV in a plain text editor (not Excel) to spot weird chars.
– If you want to be extra sure, create a test import with just the problematic rows and tweak until it sticks.
– Sometimes it helps to temporarily switch the select field to a text field, import the data, then switch back—but this is more of a hack than a fix.

Personally, I think Mautic could improve error messaging here—imagine if it flagged which rows have values not matching select options rather than silently blanking. Until then, the best bet is a tight audit of your select field values and your CSV formatting.

For the full convo and to share your tips, check out the forum thread here:
https://forum.mautic.org/t/blank-value-for-selected-field-when-importing-csv/

Share the Post: