Re: Flex - CFC Argument *ignore* figured it out
Greg Johnson wrote: I am creating 2 list boxs. One gets filled with departments onload, the other I want to populate with people in the dept when someone clicks on a dept. This is my 2ed day learning flex so I can make a major app with it. Here is the code sofar ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; initialize=initApp() mx:WebService wsdl=http://localhost/getdepts.cfc?wsdl; id=webservice1 mx:operation name=get_dept mx:request/mx:request /mx:operation mx:operation name=get_people mx:request /mx:request /mx:operation /mx:WebService mx:Model id=depts {webservice1.get_dept.result} /mx:Model mx:Model id=people {webservice1.get_name.result} /mx:Model mx:Script function initApp() { webservice1.get_dept.send(); } function getName() { webservice1.get_name.load(); } /mx:Script mx:VBox width=100% height=100% mx:HBox width=100% height=100% mx:Panel title=Department List width=50% height=100% mx:DataGrid id=Dept_List width=100% height=100% resizableColumns=true sortableColumns=true dataProvider={depts} change=getName(event.target.selectedItem.DEPT_CODE) mx:columns mx:Array mx:DataGridColumn headerText=Department Code columnName=DEPT_CODE / mx:DataGridColumn headerText=Department Name columnName=DEPT_NAME / /mx:Array /mx:columns /mx:DataGrid /mx:Panel mx:Panel title=Department Personel width=50% height=100% mx:DataGrid id=Dept_Per width=100% height=100% dataProvider={people} mx:columns mx:Array mx:DataGridColumn headerText=Name columnName=FULL_NAME / /mx:Array /mx:columns /mx:DataGrid /mx:Panel /mx:HBox mx:ControlBar width=100% height=35 horizontalAlign=right horizontalGap=0 verticalGap=0 verticalAlign=middle marginBottom=5 marginLeft=5 marginRight=5 marginTop=5 mx:Button label=Exit / /mx:ControlBar /mx:VBox /mx:Application -- Greg Johnson Owner Lead Technician [EMAIL PROTECTED] Techno-Fix-It Filling the Gap Between the Store and the Repair Shop -- www.technofixit.com Phone:(919)-371-1476 Fax:(919)-882-9804 P.O. Box 1094 Morrisville, N.C. 27560 ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218074 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Figured it out
this works OR '#dreamtext#' LIKE '% ' + DJ_Dictionary.Word2 + 's %' ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
I figured it out - THANKS
Heath, I figured out how to verify all questions were being answered. Thanks, Jeff ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Help with OUTPUT of some MORE Querys - figured it out...
Oh i got it: cfoutput #SI_Item_Name#input name="SI_Item_ID#si_Item_ID#" value="1" type="checkbox" cfif ListFind(ValueList(QgetCheckedItems.SI_Item_ID), SI_ITEM_id)CHECKED/CFIFBR /cfoutput --- Kelly Matthews Internet Development Coordinator AAAE 703.578.2509 [EMAIL PROTECTED] http://www.airportnet.org --- -Original Message- From: Kelly Matthews Sent: Tuesday, August 01, 2000 4:01 PM To: 'Stephen Moretti'; [EMAIL PROTECTED] Subject: Help with OUTPUT of some MORE Querys I wondered if you might be able to help me figure something else out. Along the same premise as the first email (at the end of this message) Once someone has filled out a form and checked certain items, the items that were checked get thrown into a 3rd table by ITEM ID. SO when editing that form I am trying to get it where all checked items will appear CHECKED On the form. So far I am doing this. (this queries to pull up a SPECIFIC report) CFQUERY datasource="#DSN#" name="QgetSI" SELECT * FROM SelfInspection WHERE SI_OPSRPT_ID = #url.SI_OPSRPT_ID# /CFQUERY Then down in the output I have what Stephen showed me earlier to get the categories and items to lay out properly: CFQUERY datasource="#DSN#" name="QgetCats" SELECT SI_Categories.SI_Category_ID, SI_Categories.SI_Category, SI_Items.SI_Item_ID, SI_Items.SI_Item_Name FROM SI_Categories, SI_Items WHERE SI_Categories.SI_Category_ID = SI_Items.SI_Category_ID ORDER BY SI_Categories.SI_Category_ID /CFQUERY The original output for a NEW form would be: cfoutput QUERY="QgetCats" group="SI_Category" #SI_Category#/bbr cfoutput #SI_Item_Name#input name="SI_Item_ID#si_Item_ID#" value="1" type="checkbox"BR /cfoutput /cfoutput However on the edit form I want that same output as above but another query becomes involved to see which items were checked upon the entry form so they will be checked when someone pulls up the EDIT form. So a query such as the following needs to be added: CFQUERY datasource="#DSN#" name="QgetCheckedItems" SELECT SI_Item_ID FROM SI_Items2 WHERE SI_OpsRpt_ID = #url.si_opsrpt_ID# /CFQUERY This query is correct when I ran it it pulled the 2 records it should have. However in the output now I need the check box to be checked if it shows up in that query, I tried the following but it didnt work: cfoutput QUERY="QgetCats" group="SI_Category" b#SI_Category#/bbr cfoutput #SI_Item_Name#input name="SI_Item_ID#si_Item_ID#" value="1" type="checkbox" CFIF qgetcats.SI_Item_ID IS "QgetCheckedItems.SI_Item_ID"CHECKED/CFIFBR /cfoutput /cfoutput It throws no errors just doesn't check ANY boxes and all the queries are definetly running correctly so its something in the way I am doing the output. Any suggestions?? Kelly -Original Message- From: Stephen Moretti [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, August 01, 2000 11:24 AM To: [EMAIL PROTECTED] Subject:RE: Help with OUTPUT of some Querys Hi Kelly, So basically SI_Items has the category ID for each item to show what category it belongs to. All Good... I want the output however to look like so. [snip] I seem to be having trouble. Obviously something has to loop and maybe even group (ooo a rhyme) because once I pull all items I have the Category ID for each but need to go back to the category table to find out what that category actually is. Also need the categories displayed BY NAME (from category table) with the items for each category (item table) listed under the appropriate Category. i am srue I am missing something little. Any suggestions??? Should I do 2 separate queries or a join? I have tried quite a few things and can't get it to work. Looks like what you need to do is : SELECT SI_Categories.SI_Category_ID, SI_Categories.SI_Category_Name, SI_Items.SI_Item_ID, SI_Items.SI_Item_Name FROM SI_Categories, SI_Items WHERE SI_Categories.SI_CategoryID = SI_Items.SI_Category_ID ORDER BY SI_Category_Name Then you need to do a nested CFOUTPUT using the GROUP attribute cfoutput QUERY="YourQuery" group="SI_Category_Name" p#SI_Catgeory_Name#BR cfoutput #SI_Item_Name# /cfoutput /cfoutput This way you have one hit on the database, the database deals with the ordering of the data and you get your sets of categories with their items. HTH Regards Stephen -- Archives:
Re: Help with OUTPUT of some MORE Querys - figured it out...
- Original Message - From: Kelly Matthews [EMAIL PROTECTED] To: 'Stephen Moretti' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 01, 2000 4:10 PM Subject: RE: Help with OUTPUT of some MORE Querys - figured it out... Oh i got it: cfoutput #SI_Item_Name#input name="SI_Item_ID#si_Item_ID#" value="1" type="checkbox" cfif ListFind(ValueList(QgetCheckedItems.SI_Item_ID), SI_ITEM_id)CHECKED/CFIFBR /cfoutput --- Kelly Matthews Internet Development Coordinator AAAE 703.578.2509 [EMAIL PROTECTED] http://www.airportnet.org --- -Original Message- From: Kelly Matthews Sent: Tuesday, August 01, 2000 4:01 PM To: 'Stephen Moretti'; [EMAIL PROTECTED] Subject: Help with OUTPUT of some MORE Querys I wondered if you might be able to help me figure something else out. Along the same premise as the first email (at the end of this message) Once someone has filled out a form and checked certain items, the items that were checked get thrown into a 3rd table by ITEM ID. SO when editing that form I am trying to get it where all checked items will appear CHECKED On the form. So far I am doing this. (this queries to pull up a SPECIFIC report) CFQUERY datasource="#DSN#" name="QgetSI" SELECT * FROM SelfInspection WHERE SI_OPSRPT_ID = #url.SI_OPSRPT_ID# /CFQUERY Then down in the output I have what Stephen showed me earlier to get the categories and items to lay out properly: CFQUERY datasource="#DSN#" name="QgetCats" SELECT SI_Categories.SI_Category_ID, SI_Categories.SI_Category, SI_Items.SI_Item_ID, SI_Items.SI_Item_Name FROM SI_Categories, SI_Items WHERE SI_Categories.SI_Category_ID = SI_Items.SI_Category_ID ORDER BY SI_Categories.SI_Category_ID /CFQUERY The original output for a NEW form would be: cfoutput QUERY="QgetCats" group="SI_Category" #SI_Category#/bbr cfoutput #SI_Item_Name#input name="SI_Item_ID#si_Item_ID#" value="1" type="checkbox"BR /cfoutput /cfoutput However on the edit form I want that same output as above but another query becomes involved to see which items were checked upon the entry form so they will be checked when someone pulls up the EDIT form. So a query such as the following needs to be added: CFQUERY datasource="#DSN#" name="QgetCheckedItems" SELECT SI_Item_ID FROM SI_Items2 WHERE SI_OpsRpt_ID = #url.si_opsrpt_ID# /CFQUERY This query is correct when I ran it it pulled the 2 records it should have. However in the output now I need the check box to be checked if it shows up in that query, I tried the following but it didnt work: cfoutput QUERY="QgetCats" group="SI_Category" b#SI_Category#/bbr cfoutput #SI_Item_Name#input name="SI_Item_ID#si_Item_ID#" value="1" type="checkbox" CFIF qgetcats.SI_Item_ID IS "QgetCheckedItems.SI_Item_ID"CHECKED/CFIFBR /cfoutput /cfoutput It throws no errors just doesn't check ANY boxes and all the queries are definetly running correctly so its something in the way I am doing the output. Any suggestions?? Kelly -Original Message- From: Stephen Moretti [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, August 01, 2000 11:24 AM To: [EMAIL PROTECTED] Subject: RE: Help with OUTPUT of some Querys Hi Kelly, So basically SI_Items has the category ID for each item to show what category it belongs to. All Good... I want the output however to look like so. [snip] I seem to be having trouble. Obviously something has to loop and maybe even group (ooo a rhyme) because once I pull all items I have the Category ID for each but need to go back to the category table to find out what that category actually is. Also need the categories displayed BY NAME (from category table) with the items for each category (item table) listed under the appropriate Category. i am srue I am missing something little. Any suggestions??? Should I do 2 separate queries or a join? I have tried quite a few things and can't get it to work. Looks like what you need to do is : SELECT SI_Categories.SI_Category_ID, SI_Categories.SI_Category_Name, SI_Items.SI_Item_ID, SI_Items.SI_Item_Name FROM SI_Categories, SI_Items WHERE SI_Categories.SI_CategoryID = SI_Items.SI_Category_ID ORDER BY SI_Category_Name Then you need to do a nested CFOUTPUT using the GROUP attribute cfoutput QUERY="YourQuery" group="SI_Category_Name" p#SI_Catgeory_Name#BR cfoutput #SI_Item_Name# /cfoutput /cfoutput This way you have one hit on the database, the database deals with the ordering of the data and you get your sets of