HELP: List questions...
I am working with ascii delimited data, trying to read them into a SQL Server table through a web browser interface. After it is all working I want to convert it to a scheduled event. The ascii is currently delimited by the pipe (|) with no enclosing quotes on the fields. CRLF defines the start of a new record. It is output by a third party program. I can change the delimiter and quotes inside the program prior to output. Ex. 197330|AY|20001211|25|88|20001211|Fall|2001|Li|Benhig19710706|Beijing,Ch ina|Male|[EMAIL PROTECTED]|61|||214||DongYingFang 907-5-9|DongGaoDi|Beijing||61|100076|20101231||DongYingFang 907-5-9|DongGaoDi|Beijing||61|100076|DongYingFang 907-5-9,DongGaoDi|Beijing||61|100076|20011231|||235|numerical analysis|Ph.D.|1||Full Time|||ErPao Institute of Technology|09/88|07/92|BS|07/92|3.5|ErPao Institute of Technology|09/93|03/96|MS|03/96|3.4|Automatic Control Engineering|3.5|4.0|Aerocraft Control,Guide and Simulatio;MS||Other (specify below)|English|12/99|480|54|800|99|730|9108/00|643|||Liao|Professor.Grad uate Adviser|ErPao Institute of Technology|Zhang|Professor,Graduate Adviser|Capital Normal University|Ke|Professor,PhD|National Natural SciChinese Academe of Launch Vehicle Tech.|Beijing|04/96|08/00|Engineer| I can read it into a textarea field with no problem using CFFILE. I can even do a simple ListLen to get the number of records in the file. Works fine so far. cfoutput cfset cr = chr(13) chr(10) pThe import list contains #ListLen(AIMxport, "#cr#")# records./p cfset reccountno = #ListLen(AIMxport, "#cr#")# /cfoutput Next I submit this to the processing page. Ex. !-- Testing page -- cfset id = 1 cfset cr = chr(13) chr(10) !--- This is where I am trying to make all fields appear, not working though cfset AIMList = "#ListQualify(AIMLIST, ,"|","ALL")#" --- cfloop index="LoopCount" from="1" to="#reccount#" cfoutput h4Main List Element #id# - Test ListGetAt function to get individual lines in the big list./h4 cfset fulllist = "#ListGetAt(AIMList, "#id#", "#cr#")#" pList length #id#: #ListLen(fulllist, "|")#/p pb#id#/b - #fulllist#/ppnbsp;/p !--- pb#id#/b - #ListGetAt(AIMList, "#id#", "#CR#")#/ppnbsp;/p --- h4Main List Element #id# - Test Getting Individual Field Elements in the list/h4 /cfoutput cfset listcount = #ListLen(fulllist, "|")# cfset fieldid = 1 cfloop index="LoopCount1" from="1" to="#listcount#" cfoutputb#fieldid#/b - #ListGetAt(fulllist, "#fieldID#", "|")#/cfoutputbr cfset fieldid = fieldid + 1 !--- The insert would happen here abouts. We need to insert each field into the tblApplicantPreload by looping through the list. --- /cfloop cfset id = id + 1 /cfloop So far I can run the above and it all prints fine. Each full record appears in the top and then a list of fields appears below it. PROBLEM Missing fields. I cannot figure out how to make the list function show fields that contain no data. It just seems to drop them, they do not appear in the output. I have tried ListQualify and that does not seem to help. Am I missing something here? Do lists not include the blank fields. The first record runs and shows 92 total fields (ListLen) the next record runs and shows only 67 fields. The second record has less data filled in by the user. I can see all of the fields in the input side. Frustrating the heck out me. Any better way to do this? Regards, Gary McNeel, Jr. DACNet Project Manager Research and Graduate Studies Rice University [OP] 713-348-6266 [M] 713-962-0885 [HO] 713-723-9240 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
HELP: List questions...
I am working with ascii delimited data, trying to read them into a SQL Server table through a web browser interface. After it is all working I want to convert it to a scheduled event. The ascii is currently delimited by the pipe (|) with no enclosing quotes on the fields. CRLF defines the start of a new record. It is output by a third party program. I can change the delimiter and quotes inside the program prior to output. Ex. 197330|AY|20001211|25|88|20001211|Fall|2001|Li|Benhig19710706|Beijing,Ch ina|Male|[EMAIL PROTECTED]|61|||214||DongYingFang 907-5-9|DongGaoDi|Beijing||61|100076|20101231||DongYingFang 907-5-9|DongGaoDi|Beijing||61|100076|DongYingFang 907-5-9,DongGaoDi|Beijing||61|100076|20011231|||235|numerical analysis|Ph.D.|1||Full Time|||ErPao Institute of Technology|09/88|07/92|BS|07/92|3.5|ErPao Institute of Technology|09/93|03/96|MS|03/96|3.4|Automatic Control Engineering|3.5|4.0|Aerocraft Control,Guide and Simulatio;MS||Other (specify below)|English|12/99|480|54|800|99|730|9108/00|643|||Liao|Professor.Grad uate Adviser|ErPao Institute of Technology|Zhang|Professor,Graduate Adviser|Capital Normal University|Ke|Professor,PhD|National Natural SciChinese Academe of Launch Vehicle Tech.|Beijing|04/96|08/00|Engineer| I can read it into a textarea field with no problem using CFFILE. I can even do a simple ListLen to get the number of records in the file. Works fine so far. cfoutput cfset cr = chr(13) chr(10) pThe import list contains #ListLen(AIMxport, "#cr#")# records./p cfset reccountno = #ListLen(AIMxport, "#cr#")# /cfoutput Next I submit this to the processing page. Ex. !-- Testing page -- cfset id = 1 cfset cr = chr(13) chr(10) !--- This is where I am trying to make all fields appear, not working though cfset AIMList = "#ListQualify(AIMLIST, ,"|","ALL")#" --- cfloop index="LoopCount" from="1" to="#reccount#" cfoutput h4Main List Element #id# - Test ListGetAt function to get individual lines in the big list./h4 cfset fulllist = "#ListGetAt(AIMList, "#id#", "#cr#")#" pList length #id#: #ListLen(fulllist, "|")#/p pb#id#/b - #fulllist#/ppnbsp;/p !--- pb#id#/b - #ListGetAt(AIMList, "#id#", "#CR#")#/ppnbsp;/p --- h4Main List Element #id# - Test Getting Individual Field Elements in the list/h4 /cfoutput cfset listcount = #ListLen(fulllist, "|")# cfset fieldid = 1 cfloop index="LoopCount1" from="1" to="#listcount#" cfoutputb#fieldid#/b - #ListGetAt(fulllist, "#fieldID#", "|")#/cfoutputbr cfset fieldid = fieldid + 1 !--- The insert would happen here abouts. We need to insert each field into the tblApplicantPreload by looping through the list. --- /cfloop cfset id = id + 1 /cfloop So far I can run the above and it all prints fine. Each full record appears in the top and then a list of fields appears below it. PROBLEM Missing fields. I cannot figure out how to make the list function show fields that contain no data. It just seems to drop them, they do not appear in the output. I have tried ListQualify and that does not seem to help. Am I missing something here? Do lists not include the blank fields. The first record runs and shows 92 total fields (ListLen) the next record runs and shows only 67 fields. The second record has less data filled in by the user. I can see all of the fields in the input side. Frustrating the heck out me. Any better way to do this? Regards, Gary McNeel, Jr. DACNet Project Manager Research and Graduate Studies Rice University [OP] 713-348-6266 [M] 713-962-0885 [HO] 713-723-9240 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: HELP: List questions...
I got around this once a while ago with a similar situation. I did a global, pre-processing replace on all sequential | symbols. I inserted a character between each pipe to "pad" the data. Might not be the best way, but it worked :). -Original Message- From: Gary McNeel, Jr. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 11:45 AM To: CF-Talk Subject: HELP: List questions... I am working with ascii delimited data, trying to read them into a SQL Server table through a web browser interface. After it is all working I want to convert it to a scheduled event. The ascii is currently delimited by the pipe (|) with no enclosing quotes on the fields. CRLF defines the start of a new record. It is output by a third party program. I can change the delimiter and quotes inside the program prior to output. Ex. 197330|AY|20001211|25|88|20001211|Fall|2001|Li|Benhig19710706|Beijing,Ch ina|Male|[EMAIL PROTECTED]|61|||214||DongYingFang 907-5-9|DongGaoDi|Beijing||61|100076|20101231||DongYingFang 907-5-9|DongGaoDi|Beijing||61|100076|DongYingFang 907-5-9,DongGaoDi|Beijing||61|100076|20011231|||235|numerical analysis|Ph.D.|1||Full Time|||ErPao Institute of Technology|09/88|07/92|BS|07/92|3.5|ErPao Institute of Technology|09/93|03/96|MS|03/96|3.4|Automatic Control Engineering|3.5|4.0|Aerocraft Control,Guide and Simulatio;MS||Other (specify below)|English|12/99|480|54|800|99|730|9108/00|643|||Liao|Professor.Grad uate Adviser|ErPao Institute of Technology|Zhang|Professor,Graduate Adviser|Capital Normal University|Ke|Professor,PhD|National Natural SciChinese Academe of Launch Vehicle Tech.|Beijing|04/96|08/00|Engineer| I can read it into a textarea field with no problem using CFFILE. I can even do a simple ListLen to get the number of records in the file. Works fine so far. cfoutput cfset cr = chr(13) chr(10) pThe import list contains #ListLen(AIMxport, "#cr#")# records./p cfset reccountno = #ListLen(AIMxport, "#cr#")# /cfoutput Next I submit this to the processing page. Ex. !-- Testing page -- cfset id = 1 cfset cr = chr(13) chr(10) !--- This is where I am trying to make all fields appear, not working though cfset AIMList = "#ListQualify(AIMLIST, """","|","ALL")#" --- cfloop index="LoopCount" from="1" to="#reccount#" cfoutput h4Main List Element #id# - Test ListGetAt function to get individual lines in the big list./h4 cfset fulllist = "#ListGetAt(AIMList, "#id#", "#cr#")#" pList length #id#: #ListLen(fulllist, "|")#/p pb#id#/b - #fulllist#/ppnbsp;/p !--- pb#id#/b - #ListGetAt(AIMList, "#id#", "#CR#")#/ppnbsp;/p --- h4Main List Element #id# - Test Getting Individual Field Elements in the list/h4 /cfoutput cfset listcount = #ListLen(fulllist, "|")# cfset fieldid = 1 cfloop index="LoopCount1" from="1" to="#listcount#" cfoutputb#fieldid#/b - #ListGetAt(fulllist, "#fieldID#", "|")#/cfoutputbr cfset fieldid = fieldid + 1 !--- The insert would happen here abouts. We need to insert each field into the tblApplicantPreload by looping through the list. --- /cfloop cfset id = id + 1 /cfloop So far I can run the above and it all prints fine. Each full record appears in the top and then a list of fields appears below it. PROBLEM Missing fields. I cannot figure out how to make the list function show fields that contain no data. It just seems to drop them, they do not appear in the output. I have tried ListQualify and that does not seem to help. Am I missing something here? Do lists not include the blank fields. The first record runs and shows 92 total fields (ListLen) the next record runs and shows only 67 fields. The second record has less data filled in by the user. I can see all of the fields in the input side. Frustrating the heck out me. Any better way to do this? Regards, Gary McNeel, Jr. DACNet Project Manager Research and Graduate Studies Rice University [OP] 713-348-6266 [M] 713-962-0885 [HO] 713-723-9240 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: HELP: List questions...
At 01:44 PM 12/13/00 -0600, you wrote: I am working with ascii delimited data, trying to read them into a SQL Server table through a web browser interface. After it is all working I want to convert it to a scheduled event. There is a really cool tag in the gallery called cf_delimtoquery that will handle all this for you, putting the delimited file into a cold fusion query that you can then operate on as with any other query. Judith Campbell Chief Technical Officer Digital Positions, Inc. [EMAIL PROTECTED] 404-351-9366 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists