Heres the situation.
I have a CrosJoin table to track what offices each contact holds within each
county. (CFX_COUNTY_CONTACT)
I have a query to pull all the current Special Needs Assessment Personel to
populate a Pulldown menu. (ListSNAP)
I have a Query to pull the child and all their various county associated
personel. (ListChild)
I have a pulldown menue to select a contact for this position from the
people that are currently in office. (ListCaseworker)
And last im populating the top name in the pulldown with their SNAP IF they
are no longer in the Active list of personel.

Is this over complicated?  It seems there ought to be an easier way to do
this.

Granted listchild is really a stored procedure with 11 left outer joins to
other information as are the other queries, so i wonder if there would be an
easier way to "insert this option tag into the select list.  Or maybe ive
just been stairing at it too long!


>
> <cfquery
>  name="ListChild"
>  datasource ="#DSN#"
>  username="#dbusername#"
>  password="#dbpassword#" >
> SELECT tbl_Children.FIRSTNAME, tbl_Children.LASTNAME,
> tbl_Children.SNAP_INITIALS, tbl_CONTACT.FNAME,
>   tbl_CONTACT.LNAME, tbl_CONTACT.CONT_ID
> FROM tbl_Children LEFT OUTER JOIN
>         tbl_CONTACT ON tbl_Children.SNAP_INITIALS = tbl_CONTACT.CONT_ID
> WHERE tbl_Children.REC_ID = <cfqueryparam cfsqltype="cf_sql_integer"
> value="#url.ID#" null="no" />
> </cfquery>
>  <cfquery
>  name="ListSNAP"
>  datasource ="#DSN#"
>  username="#dbusername#"
>  password="#dbpassword#"
>  cachedwithin="#CreateTimeSpan(0,2,0,0)#">
>  SELECT DISTINCT tbl_CONTACT.LNAME + ', ' + tbl_CONTACT.FNAME AS Name,
> tbl_CONTACT.CONT_ID
>  FROM CFX_COUNTY_CONTACT LEFT OUTER JOIN
>    tbl_CONTACT ON CFX_COUNTY_CONTACT.Contact = tbl_CONTACT.CONT_ID
>  WHERE (CFX_COUNTY_CONTACT.Roll = 3)
>  ORDER BY Name DESC
> </cfquery>
> <cfquery dbtype="query" name="retire">
>  SELECT CONT_ID
>  FROM ListSNAP
>  WHERE (CONT_ID = #ListChild.SNAP_INITIALS#)
> </cfquery>
> <cfform>
> <label>Child: </label><cfoutput>#ListChild.FirstName#
> #ListChild.LastName#</cfoutput>
> <br />
> <label>Snap Coordinator: </label>
> <cfselect
>  name="SNAP_INITIALS"
>  id="SNAP_INITIALS"
>  required="yes"
>  message="You must select a Snap from the Dropdown."
>  multiple="no"
>  query="ListSNAP"
>  value="Cont_ID"
>  display="NAME"
>  queryPosition="below"
>  selected="#ListChild.SNAP_INITIALS#">
>  <option>--- New Snap ---</option>
>  <cfif NOT retire.recordcount>
>     <cfoutput>
>    <option selected="selected" value="#ListChild.SNAP_INITIALS#"
> style="background-color:##FFCCFF; font-weight:bold;">
>     #ListChild.lname#, #ListChild.fname# - RETIRED!
>    </option>
>     </cfoutput>
>  </cfif>
> </cfselect>
> </cfform>



-- 
-- 
Richard Dillman
[EMAIL PROTECTED]
(317) 916-8341

"...the very powerful and the very stupid have one thing in common, they
don't alter their views to fit the facts, they alter the facts to fit the
views."


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255692
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to