Copy link to clipboard
Copied
Hi,
I have a query which is called "myQuery" and I want to have the value of a field in myQuery like below:
myValue= #myQuery.FirstName#
But the name of the field is in another variable: #myfield#. So, I want :
myValue= #myQuery.#myfield##
But this statement cause an error as it has nested variables.
Could any body help me to solve my problem?
One can refer to a query cell via this notation:
query[columnName][rowNumber]
Where "query" is the query variable, "columnName" is a string (or string variable) representing the column name and rowNumber is a positive integer (or variable holding same) representing the row number.
I can't actually find this in the docs, strangely.
--
Adam
Copy link to clipboard
Copied
One can refer to a query cell via this notation:
query[columnName][rowNumber]
Where "query" is the query variable, "columnName" is a string (or string variable) representing the column name and rowNumber is a positive integer (or variable holding same) representing the row number.
I can't actually find this in the docs, strangely.
--
Adam
Copy link to clipboard
Copied
I can't actually find this in the docs, strangely.
It is mentioned in a few places, I think. Unfortunately, none of them are where most people would think to look for it IIRC.
Copy link to clipboard
Copied
It's mentioned - in passing - here.
There's no mention of this, or cross reference to this, or any suggestion it's relevant at all on the <cfquery> page, which is... oh, I dunno... it's predictable of livedocs, really.
--
Adam
Copy link to clipboard
Copied
It's mentioned - in passing - here
Oh, yeah. Definitely not in my top ten list of likely places.
-Leigh
Copy link to clipboard
Copied
Thanks Adam.
Mandana
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more