• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Reference cfsavecontent var in cfquery

Explorer ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

This code doesn't work, as it produces an unknown variable error. I have to be missing something simple. Thanks.

<cfsavecontent variable="updtTblPSDN">
if(_global.arrPassdown == undefined) _global.arrPassdown = grdPassdown.dataProvider.slice(0);
var arrPassdown = _global.arrPassdown;

for(var i = 0; i < arrPassdown.length; i++)
{
if(arrPassdown[ i ]['SUP_APPRVD'] == true)
{
var arrID = arrPassdown[ i ]['ID'];
<cfquery datasource="Oracle">
UPDATE INTEL.PASSDOWN SET SUP_APPRVD='Y' WHERE ID= arrID
</cfquery>
}
}
</cfsavecontent>
TOPICS
Advanced techniques

Views

8.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

You are missing a script tag. You are also trying to pass a js (or as) variable to cf (at least that is what it looks like). You also have a cf tag inside a script. You are also using cfsavecontent to create a variable that won't have a value.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

LATEST
I figured that out after I posted that you can't have actionscript execute cf code. So I wrote the values to an array and passed that as a variable to the page that needed it.

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation