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

variables stored in a database

Explorer ,
Jan 02, 2007 Jan 02, 2007

Copy link to clipboard

Copied

OK night owls, see if anyone has a solution for this mind bender!!

I need to post a form to a Crystal reports csp page. The form variables need to be dynamic and are stored in a database. By that I mean: this is in a database cell: {myTable.myField} = #client.myVar# exactly as you see it. On my cfm page I loop over the result set and the hidden input form field looks like this:
input type="hidden" name="selectionFormula" value = "#myQuery.userSF#" . What I WANT is if you view source on the cfm page I want the form field to look like this:
input type="hidden" name="selectionFormula" value = "{myTable.myField} = 12345" where 12345 represents the evaluated form of #client.myVar# which is what was stored in the database.

My problem is that when the cfm page renders the value for the selectionFormla hidden field is exactly what was in the database (i.e. NOT evaluated) as so: {myTable.myField} = #client.myVar#. This of course blows my crystal report up because it doesn;t know what #client.myVar# is.

Any ideas on an elegant solution to this?

Thanks tons!!!
TOPICS
Advanced techniques

Views

216

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 ,
Jan 03, 2007 Jan 03, 2007

Copy link to clipboard

Copied

LATEST
I want the form field to look like this:
input type="hidden" name="selectionFormula" value =
"{myTable.myField} = 12345" where 12345 represents the evaluated form of
#client.myVar# which is what was stored in the database.

Thus the inclusion of the evaluate() and de() [delay evaluate] functions
in CF, see docs for full details. I can never remember when one use
one, the other or both so some experimentation will be required, but one
of these forms should work.

input type="hidden" name="selectionFormula" value =
"#evaluate(myQuery.userSF)#"

OR

input type="hidden" name="selectionFormula" value = "#de(myQuery.userSF)#"

OR

input type="hidden" name="selectionFormula" value =
"#evaulate(de(myQuery.userSF))#"

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