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

Save Query Results

Guest
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

Every time this page is called it runs the component. Isthere a way to save the results of the component when it runs the first time? I need to hold it and compare the results to a form field. The only thing is everytime the hit they submit button it runs the query again and give different results. I tried using hidden fields but they change everytime the page is reloaded.

<cfinvoke component="swabl/IdentityAnswers" method="IDQuestions" returnvariable="getItems">

<form name="form1" action="" method="post">
<input name="question" type="hidden" value="<cfoutput query="getItems">#question#</cfoutput>" />
<input name="answer" type="hidden" value="<cfoutput query="getItems">#answer#</cfoutput>" />
</form>


TOPICS
Advanced techniques

Views

309

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 ,
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

returnvariable = "session.getItems" OR returnvariable =
"application.getItems" OR returnvariable = "server.getItmes" Depending
on where you would like to persist the results. The documentation has
lots of information on the persistent variable scopes.

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
Guest
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

so if I use returnvariable = "session.getItems", do I have to set up sometype of session?

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
LEGEND ,
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

You have to enable sessions in your application.cfm/cfc file.

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
LEGEND ,
Apr 27, 2007 Apr 27, 2007

Copy link to clipboard

Copied

LATEST
Dan Bracuk wrote:
> You have to enable sessions in your application.cfm/cfc file.

I would like to clarify that the <cfapplication...> tag does not HAVE to
be in the application.cfm/cfc files. Those locations are a very
convenient place to put the tag, but the tag can be coded anywhere. It
just has to be in any file that one wants to connect to a given
application on a server as defined by the name parameter in the
<cfapplication...> tag.



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