Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
studentRickie #1
dynamic expressions
I have two identical (in terms of number of fields and their names ) datasets
with different names.
Trying to build an expression that dynamically changes "dataset" name in
cfoutput
<td><input type="text" name="somename" value="#dataset.fieldname#" ...</td>
no luck so far... Any tips? Thanks
studentRickie Guest
-
Regular Expressions :(
Hello all! I was trying to write down a function to remove all the bbcode tags from a post before showing it (non in the phpbb, in another... -
RE : RE : RE : Regular expressions
I am issuing this command on an Aix box and running allright :-) Forgive my curiosity.. are you running Solaris on a x86 box? Steve Hemond... -
PHP regular expressions
Hello, I am writing an elearning software with php. I need a script to recognize any inut of the type ab,aabb,aaabbb,aaaabbbb..... And so on.... -
[PHP] Q on Regular Expressions
* Thus wrote jsWalter (jsWalter@torres.ws): have you looked at strtotime()? http://php.net/strtotime The Date formats it can find are defined... -
What is qr for in reg expressions in a a string?
On Wednesday, August 13, 2003 10:45, Motherofperls@aol.com wrote: From "perldoc -q perlop" qr/STRING/imosx This operator quotes (and... -
jdeline #2
Re: dynamic expressions
Your code fragment suggests that a query has been executed with your trying to
the enter the value of filename into form field. If that is correct, then
perhaps the code below will help.
<CFIF someCondition>
<CFSET ds = "datasource1">
<CFELSE>
<CFSET ds = "datasource2">
</CFIF>
<CFQUERY NAME=#ds" ...>
SELECT filename FROM myTable WHERE id = #id#
</CFQUERY>
<td><input type="text" name="somename" value="#ds.fieldname#" ... ></td>
jdeline Guest
-
LeftCorner #3
Re: dynamic expressions
Not sure I understand the question, sounds like its just as easy as:
<cfif YourCondition>
<cfset dspSomeone = dataset1.fieldname>
<cfelse>
<cfset dspSomeone = dataset2.fieldname>
</cfif>
<td><input type="text" name="somename" value="#dspSomeone#" ...</td>
LeftCorner Guest
-
LeftCorner #4
Re: dynamic expressions
jdeline beat me too it. . . but with his method you probably need
#Evaluate(ds.fieldname)#
for it to work
LeftCorner Guest



Reply With Quote

