- see footer for list info -<
Yes I know it is delay evaluation but I am still not 100% clear how the combination of Evaluate() and DE() is helping achieve this... i.e. what exactly CF is doing with this expression
Yes I think I have decided to do this a different way anyhow but I really wanted to know if there is a syntactical solution to what I was trying to achieve originally The idea originally was this... I have an registration application the is being hit from different areas of the site. I have a configuration table holding data about each area of the site that we have come from and this particular field is going to hold a returnpath to use in a link to send the user back. I can't hardcode the full path in the database because we have different paths for dev/test/live - which is where the request.root variable comes in to play... but not only that we have different root variables e.g. request.appsroot request.comproot request.root and it may be that each of the site areas that the user has come from will need to use any one of these... hence storing it in a configuration table so that each site area can have it's own approproate root variable name which will then be resolved at run time I don't think I can use it directly in code because I don't know which one I need hence the idea of putting the appropriate one in the configuration table (each record in the table relates to an area of the site) The other alternative would be to set a flag to say which one we need and then use the appropriate variable in code depending on the flag that has been set On 5/25/06, Stephen Moretti <[EMAIL PROTECTED]> wrote:
>- see footer for list info -< de() is delay evaluation. Why are you storing the variable in the DB? Its already available in the application, so why not just use it directly in your code? However you do it there's got to be better ways of managing this than storing the variable in the db table and doing a evaluate(de(...)), which is just really horrible... On 25/05/06, RichL <[EMAIL PROTECTED]> wrote: > >- see footer for list info -< > That's really great thanks... it was the DE that I was missing... I did > think about trying it but after reading more about it didn't seem asthough > it fitted what I need > > Can you explain what the DE adds to this please? > > Thanks again > > > On 5/25/06, Adam Cameron <[EMAIL PROTECTED]> wrote: > > > > >- see footer for list info -< > > <cfset path ="##request.root##filename1.cfm"> > > <cfset request.root = "C:\Inetpub\wwwroot\"> > > <cfoutput>#evaluate(de(path))#</cfoutput> > > > > I have to admit, I've never understood this. > > -- > > Adam > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of RichL > > Sent: 25 May 2006 08:32 > > To: cfdev > > Subject: [CF-Dev] Dynamic variable evaluation > > > > >- see footer for list info -< > > If I have a path set in a request variable e.g. request.root and I want > > to hold a path and filename in the db together using the request > > variable and a fixed file name; I was thinking I could hold it something > > like > > > > #request.root#/filename1.cfm > > > > then pull back this value from the DB and have CF resolve the value of > > request.root but it doesn't seem to work. I've tried various > > combinations using Evaluate but can't get it to resolve the variable > > whilst forming a string with the filename as it is stored on the DB. > > > > Any ideas ? > > > > (I tried storing it on the DB in a field called path as: > > > > request.root & "filenamea.cfm" > > > > and then setting a new variable equal to the queryname.path but that > > doesn' > > resolve properly either > > > > -- > > Rich > > _______________________________________________ > > > > For details on ALL mailing lists and for joining or leaving lists, go to > > http://list.cfdeveloper.co.uk/mailman/listinfo > > > > -- > > CFDeveloper Sponsors:- > > >- Hosting provided by www.cfmxhosting.co.uk -< > > >- Forum provided by www.fusetalk.com -< > > >- DHTML Menus provided by www.APYCOM.com -< > > >- Lists hosted by www.Gradwell.com -< > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help > > > > >-< > > _______________________________________________ > > > > For details on ALL mailing lists and for joining or leaving lists, go to > > http://list.cfdeveloper.co.uk/mailman/listinfo > > > > -- > > CFDeveloper Sponsors:- > > >- Hosting provided by www.cfmxhosting.co.uk -< > > >- Forum provided by www.fusetalk.com -< > > >- DHTML Menus provided by www.APYCOM.com -< > > >- Lists hosted by www.Gradwell.com -< > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help > > -< > > > > > > -- > Rich > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< > _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
-- Rich _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -< - Forum provided by www.fusetalk.com -< - DHTML Menus provided by www.APYCOM.com -< - Lists hosted by www.Gradwell.com -< - CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
