• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

custom cfoutput from verity results

Participant ,
Jun 29, 2006 Jun 29, 2006

Copy link to clipboard

Copied

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>
TOPICS
Advanced techniques

Views

200

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

LATEST
Try creating a separate query for each month base on cfsearch criteria, then group the querys in one output.
Also characters like "_" (underscore) has given me fit before, try cleaning up the sting using ListLast
Example: <cfset ID = ListLast(URL, "_")>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation