2 Replies Latest reply on Dec 29, 2006 9:56 PM by TommyMTL

    How to

    TommyMTL
      turn something like this to dynamic in order to replace all

      <cfset temp = QuerySetCell(MyQuery, "admin", #mydoc.row.admin.XmlText#, #i#)>
      to
      <cfset temp = QuerySetCell(MyQuery, "#Variable 1#", #mydoc.row.Variable 2.XmlText#, #i#)>



        • 1. Re: How to
          Charlie Griefer Level 1
          not tested...
          • 2. How to
            TommyMTL Level 1
            This is great many thanks, it is working fine.

            Now that I can view the result usign <cfdump var="#MyQuery#">
            How can I output it to a form? assuming that my colList values are comming from a dynamic list
            <cfset colList = "#MyList#" />

            and My List is from the following code and XML document that change childnodes all the time:
            <cffile action="read" file="C:\Documents and Settings\Administrator\Application Data\pbx\#URL.Action#\table.xml" variable="myxml">
            <cfset mydoc = XmlParse(myxml)>
            <cfset myList = "">
            <cfloop from="1" to="#arrayLen(mydoc.XmlRoot.XmlChildren)#" index="n">
            <!--- Default delimiter (comma) implied --->
            <cfset myList = listAppend(myList,mydoc.XmlRoot.XmlChildren[n].XmlText)>
            </cfloop>
            <cfdump var="#MyList#" expand="no">
            <cfset PreListEval = QueryNew("Name, TagName")/>
            <cfloop list="#MyList#" index="i">
            <cfscript>
            newRow = QueryAddRow(PreListEval);
            newColumn = QuerySetCell(PreListEval,"TagName", i);
            newColumn = QuerySetCell(PreListEval,"Name", i);
            </cfscript>