Ask a Question related to Coldfusion Database Access, Design and Development.
-
GarryCS69 #1
Output query by selecting a cftree
I have taken the code attached from the cf examples. I want to change it
slightly. I want to be able to select an item from the cftree and when I do the
selection a report will be generated.
So I have a database of events. The main cftree will list all events by
artist,style,date. If the user selects style I want to create a list of all
concerts, ordered by style. If I select Rock (a sub category of style) on the
cftree I will get an output list of all rock concerts. So what do I use instead
of the cfinput that is in the sample script
Thanks
Garry
<cfquery name="Gigs" datasource="LobbyData">
select Artist,Date,Time,MusicStyle
from AllGigsByArtist
order by Artist,Date
</cfquery>
<cfform name="form1" format="Flash" width="500" height="400">
<cfformgroup type="HBox">
<cfformgroup type="VBox">
<cftree
format="Flash"
Name="tree1"
Width="300"
Height="200"
HScroll="yes"
VScroll="yes"
Border="no"
AppendKey="yes"
lookandfeel = "motif"
bold="no"
completepath="yes"
align="left">
<cftreeitem value="Artist,Date"
display="Artist,Date"
query="Gigs"
queryasroot="By Artist"
expand="Yes,NO,NO">
<cftreeitem value="MusicStyle,Artist,Date"
display="MusicStyle,Artist,Date"
query="Gigs"
queryasroot="By Style"
expand="Yes,NO,NO">
<cftreeitem value="Date,Artist"
display="Date,Artist"
query="Gigs"
queryasroot="By Date"
expand="Yes,NO,NO">
</cftree>
</cfformgroup>
<cfinput type="text" name="display" label="display"
bind="{tree1.dataProvider[tree1.selectedIndex]['Artist']}">
<cfinput type="text" name="value" label="value"
bind="{tree1.selectedNode.getProperty('data').valu e('Date')}">
<cfinput type="text" name="path" label="path"
bind="{tree1.selectedNode.getProperty('data').path }">
</cfformgroup>
</cfform>
GarryCS69 Guest
-
#39671 [NEW]: dns_get_record whould allow selecting dns to query
From: overflow at interlink dot es Operating system: Linux 2.6 PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug... -
CFC Query output to XML?
Good day, Over the past six months or so, I have been developing an application that uses Flash MX 2004, and ColdFusion MX 6.1. I have a number... -
Encoding (UTF-8) and Query Output
Hello, I am trying to get UTF-8 and Cold Fusion to play nice. So far... things have been nutz! If you can take a look at the 3 files in the... -
Organize query output?
I am doing a query on a MySQL Database and pulling all shops out of our data. That works fine except I want to organize all the shops by state. For... -
Query by column name & output
Hi I have a lot of column names that have a value of 1 or 0. HasRadio 1 BarLounge 0 IndoorPool 1 etc etc. I am thinking of the best way to query...



Reply With Quote

