This topic is locked

Save Data in Assigned Variable

7/19/2010 4:01:34 PM
ASPRunnerPro General questions
J
Jay123 author

Hi!
How can you save a data in an assigned variable (not in session variable) so you can use it in the Add Page of another table?
Thanks,

Jay

A
ann 7/20/2010

Jay,
you can create a global variable in the After application initialized event on the Events tab.

J
Jay123 author 7/20/2010

Thanks, Ann.
Can you pls. give an example on how to declare and assign variable?
For example, field1 on table2 should be equal to field1 on table1 when the Add page of table1 gets displayed.
Thanks,

Jay

A
ann 7/21/2010

Jay,
to declare variable in the After Application initialized event use the code:

gl_var=5



then use the variable in the events:

gl_var+=1
J
Jay123 author 7/21/2010

Hi Ann,
Could you pls. explain more on this?

gl_var=5

gl_var+=1
If I'm going to assign x as the variable for field1 on table1, how will I declare it in After Application initialized or in the Event?
Thanks,

Jay

A
ann 7/22/2010

Jay,
use Data Access Layer(DAL) functions to select record values of field1 from table1:

http://xlinesoft.com/asprunnerpro/docs/data_access_layer.htm

J
Jay123 author 7/22/2010

Hi Ann,
I have tried that before but that didn't work in my current situation. The dal didn't work in Add Page before display event.
The session variable wouldn't work in my case either since the administrator will enter the value of "field1" on table2 and users (who are using different machines) need to see the value of "field1" on table1.
The technique that I have used before was to use a lookup wizard and it worked. However, my situation this time is a bit different so I would like to store that value of field1 as a global variable and can be pulled/used from different tables.
Thanks,

Jay

A
ann 7/23/2010

Jay,
it's difficult to tell you what's happening without seeing actual files.

Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error. 'Demo Account' button can be found on the last screen in the program.

J
Jay123 author 7/23/2010

Hi Ann,
I have opened a ticket and attached a screenshot of my table. I've tried the demo account but for some reasons, it's not going through. It is probably blocked by our Network Security.
Thanks,

Jay