Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

Support Forum



Data Region Variable Reset?
radar717 asked:
I have a page with 2 Data regions on it.  in the first I do a

myvar=record.Mydata;

after the end of the first data region I use the syntax

#myvar# to display the data but I cant access the decimal variable in an expression in the second region.

How can I use this variable in an expression in the second data region.  No matter how I seem to phrase it I can't access it.

What am I doing wrong?
 
  radar717 responded:
  Oops I need a nested data region.  
  radar717 responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  radar717 responded:
  This issue is open.  
  radar717 responded:
  Still can't access #myvar#.

It's weird because I can still display it as #myvar# in a table AFTER both data regions.

How do I access the var in a expression in the 2nd region.

Preloading a junk field for later use isnt working either.  any guesses?
 
  radar717 responded:
  Expression Field Variablew Syntax?  
  radar717 responded:
  <!--#  //ws script
record.junk1=JsalePrice;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>


#JsalePrice# displays in table after dataregion.
 
  radar717 responded:
  NO GO.  What's up.

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

<!--#
record.junk1 = JSalePrice + 1.00;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>
 
  dougl responded:
  where do you define your variable?

try:

<body>
<!--#
var JSalePrice;
#-->

<ws:dataregion>
...
<!--#
JSalePrice = record.price;
#-->
...
</ws:dataregion>

<ws:dataregion>
...
The sale price mentioned above is: #JSalePrice#
...
</ws:dataregion>

</body>
 
  radar717 responded:
  the sale price is #rprice#.

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

<!--#  //ws script
record.junk1 = #rprice#;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>


Displays correct data but wont change the junk1 field. Why?
 
  radar717 responded:
  ** the sale price is #rprice#.

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

<!--#  //ws script
record.junk1 = rprice;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>
 
  radar717 responded:
  (I'm trying to change the value in Grid mode - does it matter?)


** the sale price is #rprice#.

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

<!--#  //ws script
record.junk1 = rprice;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

Displays correct data but wont change the junk1 field. Why?
 
  radar717 responded:
  ** the sale price is #rprice#.

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

<!--#  //ws script
record.junk1 = rprice;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

response.write("<ws:field name="exp2" expr="2">");
<ws:caption>Field</ws:caption></ws:field>

response.write("<ws:field name="exp2" expr="#rprice#">");
<ws:caption>Field</ws:caption></ws:field>


Why do both bottom lines display 2?
 
  radar717 responded:
  ** the sale price is #rprice#.

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

<!--#  //ws script
record.junk1 = rprice;
#-->

<ws:field name="junk1">
<ws:caption>junk1</ws:caption>
</ws:field>

response.write("<ws:field name='exp2' expr="2">");
<ws:caption>Field</ws:caption></ws:field>

response.write("<ws:field name='exp2' expr="#rprice#">");
<ws:caption>Field</ws:caption></ws:field>


Why do both bottom lines display 2?

Starting to think my problem is grid mode.  Is it possible to read a variable using *ANY* method in grid mode.

I want to use rprice in my grid calculations.

No matter what I do I can't diplay rprice in the grid.  Why doesnt response.write work?
 
  radar717 responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  radar717 responded:
  This issue is open.  
  radar717 responded:
  Please read last post  
  radar717 responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  dougl responded:
  This issue is open.  
  dougl responded:
  OK. Tell me more about what you're trying to do.

Do you simply want a cell in your grid to display rprice?

Or do you want to include rprice in your calculations?

Or do you want to pre-fill a field value with rprice?
 
  dougl responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us