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

address variable that holds more than one fields to downloadable CSV excel file

New Here ,
May 05, 2007 May 05, 2007

Copy link to clipboard

Copied

Hello I have this code that converts a regular document to a downloadable CSV excel file
And it works great:
<cfcase value="CSV">
<CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=Property.csv">
<cfcontent type="application/csv">"CalNUM","PEENUM”
<cfloop query="getGPAZCCases"><cfoutput>"#ltrim(CalNUM)#","#PEENUM#"

.
My goal is to add the address field that composes of these fields below:

#ST_no#
#ST_DIR#
#ST_Name#
#st_suffix#"
so I added this like the code below.


<cfcase value="CSV">
<CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=Property.csv">
<cfcontent type="application/csv">"CalNUM","PEENUM”
<cfloop query="getGPAZCCases"><cfoutput>"#ltrim(CalNUM)#","#PEENUM#"


Unfortanetly it has not worked out.

If I do have a CFSET to declare a variable to hold the address field like so:
<CFSET address=(" #ST_no# ", " # ST_DIR# ", "# ST_Name # ", " # st_suffix #
")">
Where do I put it in the existing codei have below?
Thanks in advance.


<cfcase value="CSV">
<CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=Property.csv">
<cfcontent type="application/csv">"CalNUM","PEENUM”
<cfloop query="getGPAZCCases"><cfoutput>"#ltrim(CalNUM)#","#PEENUM#"

TOPICS
Advanced techniques

Views

284

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

correct answers 1 Correct answer

Guide , May 05, 2007 May 05, 2007
> so I added this like the code below.

It doesn't look any different than the code posted above it.

a) Try adding the name of the new column:

"CalNUM","PEENUM", "ADDRESS"

b) Then add the four fields enclosed in one set of quotes

"#ltrim(CalNUM)#","#PEENUM#", "#ST_no# #ST_DIR# #ST_Name# #st_suffix#"

Votes

Translate

Translate
Guide ,
May 05, 2007 May 05, 2007

Copy link to clipboard

Copied

> so I added this like the code below.

It doesn't look any different than the code posted above it.

a) Try adding the name of the new column:

"CalNUM","PEENUM", "ADDRESS"

b) Then add the four fields enclosed in one set of quotes

"#ltrim(CalNUM)#","#PEENUM#", "#ST_no# #ST_DIR# #ST_Name# #st_suffix#"

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
New Here ,
May 07, 2007 May 07, 2007

Copy link to clipboard

Copied

LATEST
cf_dev2

IT WORKS GREAT!

Thanks for your Help

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