1 Reply Latest reply on Oct 12, 2006 4:12 PM by dawes4000

    custom cfoutput from verity results

    brianism
      Hi All,
      Wondering if anyone can help me out. I am trying to group my output that I am gettting from a verity search. I have a six digit unique number that gets passed through a form, example 100030. Then this number searches a verity collection of files to find any file starting with that number. All files being searched are named like this 100030_200601.pdf, 100030_200602.pdf, 100030_200603,pdf etc. Signifying the unique person "100030", the year "_2006" and the month "01".

      The "200602" part would signify the year 2006 and the month of February. My problem is I am trying to seperate and group this output by year and date according to what the verity search finds. I thought I was on the right track with this code but it's not displaying what I want, it just spits out a bunch of repeat months and years and scatters the file under the correct ones:

      cfset form.finditems = "100030">

      <cfsearch collection="mysearch"
      name="FindItems"
      type="explicit"
      criteria="#form.FindItems#">

      <cfoutput query="FindItems">
      <cfif FindItems.url CONTAINS "_200603">
      <br><br>
      March 2006
      <li><font face="arial, verdana" size=2><a href="../reports/#FindItems.URL#" target="_blank">#FindItems.url#</a>
      </cfif>
      <cfif FindItems.url CONTAINS "_200602">
      <br><br>
      February 2006
      <li><font face="arial, verdana" size=2><a href="../reports/#FindItems.URL#" target="_blank">#FindItems.url#</a>
      </cfif>
      <cfif FindItems.url CONTAINS "_200601">
      <br><br>
      January 2006
      <li><font face="arial, verdana" size=2><a href="../reports/#FindItems.URL#" target="_blank">#FindItems.url#</a>
      </cfif>
      </cfoutput>