If you have a list like this
1,2,3,,5,6
is there any way of getting ListGetAt(List, 4) to return "" and not "5"?
Reason:
A client is going to supply data in a comma delimited text file, one
record per line. A template will populate several database tables from
that file. Each record is stored on a different line.
In fields such as Address1, Address2, Address3, there will be empty
values in some records. I was going to write the query in a CFLOOP,
something like:
INSERT INTO Site (Name, Address1, Address2, Address3, etc)
VALUES ('#ListGetAt(List, 1)#', '#ListGetAt(List, 2)#',
'#ListGetAt(List, 3)#', '#ListGetAt(List, 4)#', etc)
But if, for example, Address3 is blank, ListGetAt(List, 4) returns the
value that should go in the next field (Town), ie the fifth element in
the list.
If ListGetAt returned null values from a list, this wouldn't be a
problem.
Thanks in advance
--
Aidan Whitehall <[EMAIL PROTECTED]>
The Net Profits Internet Services
ColdFusion website development, domain names, hosting and tuition
Tel: +44 (0) 1695 50050 (North West England)
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.