troubleshooting Question

Trying to output flat file rows as separate rows in a table - CF

Avatar of geraldw
geraldw asked on
Web Servers
2 Comments1 Solution173 ViewsLast Modified:
Hello,
We're using CFMX 6.1 on Win2003.

I'm reading the following text from a flat file with cffile action=read :
14,test 30,7/23,progress,jw,no|
15,test 31,7/24,done,jw,,|
16,test 32,7/24,done,jw,,|
17,test 40,7/23,in progress,jw,no|
18,test 41,7/24,done,jw,no|
19,atest 43,7/24,done,jw,no|

In the next page I need to show the info in a table while outputting each numbered item as a row in a table:

ISSUE ID      TEST ISSUE     DATE    STATUS    DEVELOPER    UPLOADED
19                atest               7/24       done          jw                       no

I have tried to read the entire file and put it into a LIST:

<cfset theList = ListToArray(issuesList, '|')>

then I try to cfloop through that list with:
<cfoutput>
  <cfloop from="1" to="#ArrayLen(theList)#" index="i">
    <tr>
      <td><!--- item no --->
          #trim(listGetAt(theList, 1))#
      </td>
      <td><!--- issue --->
            #trim(listGetAt(theList, 2))#
       </td>

Anyone who knows what they are doing will see that I don't.  I was thinking that I would make an ARRAY of LISTS and then parse through each one and use LISTGETAT using the comma as the delimiter.

Any ideas would be appreciated.

Thanks, Jerry
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros