> If you are storing column names in the database, then you may be > Forced to use evaluate. Is there any chance of changing the database > Design?
Nope. This feature is critical to the application. Chad On 5/19/05, Adam Chapman <[EMAIL PROTECTED]> wrote: > Hi Chad, > > > I have not tested this yet, as it seems this is an MX feature and I am > on CF 5 for the next week or so. > > form["MyRadio" & IndexNo] > > This will work on cf5.. I do this all the time on my cf5 machine. > > If you are storing column names in the database, then you may be > Forced to use evaluate. Is there any chance of changing the database > Design? > > Cheers, > Adam > > -----Original Message----- > From: Chad Renando [mailto:[EMAIL PROTECTED] > Sent: Thursday, 19 May 2005 7:39 AM > To: CFAussie Mailing List > Subject: [cfaussie] evaluating evaluate (was Dynamically Named > Variables) > > > Across the board yesterday , I read "avoid evaluate", but I could not > find any guidelines on when it "must" be used. > > I usually see it being used in situations where the variable is being > named dynamically, such as the case of passing a list of form fields > (form.MyRadio1, form.MyRadio2, etc.). I have read the solution to this > being one of addressing the scope as a structure, like so: > > form["MyRadio" & IndexNo] > > I have not tested this yet, as it seems this is an MX feature and I am > on CF 5 for the next week or so. > > However, I am dealing with a situation shared by Bec Gorton where I am > reading the column names from the database. Here is an example of the > logic: > > I have a Table column called: MyDynamicVariable > > The value of MyDynamicVariable = MyVariable > > If I output MyDynamicVariable, I get "MyVariable". > > However, I want to output MyVariable, which = "John". > > The only way I know to do this is evaluate MyDynamicVariable. > > A similar logic could be found by passing a variable name in a form > field. > > So is there a way around using evaluate in this situation? > > Chad > who says, "Nice smile, Bec!" > http://www.aad.gov.au/MediaLibrary/asset/mediaitems/ml_382894364467593_B > ec_1.jpg > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to > [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ > --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
