If you're on CF8, you can convert the list to an array using
ListToArray and tell it to include empty fields:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_l_21.html#131626
<cfset listarray = ListToArray(myarray[1],",",true)>
Now you can get your 4th value as:
listarray[4]
If you're not on CF8, you can always do a string replacement
on 2 commas in a row and replace it with a known value that you can
then use as an empty value.
<cfset updatedlist =
replace(mylist,",,",",EMPTY,","ALL")>
Now when you do your ListGetAt(updatedlist,4), you'll get
"EMPTY" back.
There are some pains with this method. First, you have to do
2 replaces in a row, because if mylist has 2 empty values in a row
("hello,,,goodbye") then with the first replace, you end up with
"hello,EMPTY,,goodbye". Second, all code from then on needs to know
about the placeholder "EMPTY" and replace it with an empty string.
So, if you're going to do this, you'll need to do:
<cfset updatedlist =
replace(replace(mylist,",,",",EMPTY,","ALL"),",,",",EMPTY,","ALL")>
to get around the first issue I mentioned.
Don't use cfinsert, you won't get NULL values regardless of
whether you are on CF8 and use the listtoarray method or not. If
you want NULL values in cases where list values are empty, you need
to handle that yourself.