Actualky it does work.  Ask Mark Warrick at [EMAIL PROTECTED] how.  I know
that he's done it before I just don't remember exactly how he did it.
--K

-----Original Message-----
From: Michael Slatoff [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 13, 2000 8:52 PM
To: [EMAIL PROTECTED]
Subject: RE: dynamic cfcase?


I actually misstated the problem.

<cfcase> doesn't allow variables as a value. I wanted to be able to create
each fuseaction based on a sql table. Does anyone know of a custom tag that
could be used that would accept a variable?

<cfinclude template="qry_fusesettings.cfm">

<cfswitch express="#attributes.fuseaction#">
   <cfcase value="#fusesettings.fusename#">
      <cfloop from="1" to="#ListLen(fusesettings.settings)#"
index="Counter">
           <cfif (counter mod 2) is 1>
              <cfset nextcount = counter + 1>
                <cfset "attributes.#listGetAt(fusesettings.settings,
counter)#" =
"#listGetAt(fusesettings.settings, nextcount)#">
           </cfif>
        </cfloop>
        <cfinclude template="#fusesettings.fusetemplate#">
   </cfcase>
</cfswitch>

I've come up with a way of getting around this, but it gets away from using
<cfswitch> & <cfcase> in the index.cfm.

Michael Slatoff
www.designmetric.com


-----Original Message-----
From: Fred T. Sanders [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 12, 2000 8:22 PM
To: [EMAIL PROTECTED]
Subject: Re: dynamic cfcase?


have you tried doing it nested inside of a cfswitch statement?


<cfif something>
    <cfswitch expression="#yourvariable#">
        <cfcase value="this"
            your code here
        </cfcase>
        <cfcase value="that"
            your code here
        </cfcase>
        <cfcase value="the_other_thing">
            more of your code here
        </cfcase>
    </cfswitch>
</cfif>
----- Original Message -----
From: "Michael Slatoff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 12, 2000 8:59 PM
Subject: dynamic cfcase?


> I've been working on redoing an intranet using the fuesbox methodology and
> was attempting to set up circuits that were based on a sql table. I've run
> in to a problem... <cfcase> doesn't like to be used inside of <cfif>. Does
> anyone know of a way of creating a dynamic <cfcase>?
>
> Michael Slatoff
> www.slatoff.com
>
>
> --------------------------------------------------------------------------
----
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to