Jump to content
Sign in to follow this  
Greg Hains

Variables Across Tables - Global?

Recommended Posts

Hi,

Before I tear what hair I have left out, I am having difficuly trying to carry a value from one table to another.

I hope I dont leave anything crucial out here during my description, but I have a sumamry field which is the total of some entries in another field in the same total. This value needs to be seen in a layout of another table (same database file). I have tried using the Let($$var) function without luck.

I am using the DataViewr option of FmPro Advanced and see that the variables are correct whilst viewing a layout "attached"(?) to the first table and the numbers are correct. As soon as I move to the next table the numbers revert to zero.

What fields and/or types and (etc) do I use to view this variable on the other side - so to speak.

Greg

Can somebody plea

Share this post


Link to post
Share on other sites

Hi Greg

If you put your values into global fields and establish a cartesian (x-type) relationship between your 2 tables you will be able to 'see' the global values

HTH

Phil

Share this post


Link to post
Share on other sites

Thanks. Sorted. ;)

Share this post


Link to post
Share on other sites

If you put your values into global fields and establish a cartesian (x-type) relationship between your 2 tables you will be able to 'see' the global values

this can be stripped to:

If you put your values into global fields you will be able to 'see' the global values

( all tables, even unrelated, can see globals )

Share this post


Link to post
Share on other sites

If it's same file you could also just use

Set Variable[];

Share this post


Link to post
Share on other sites

If it's same file you could also just use

Set Variable[];

And if isn't - save the properties in the script parameter, the script in the other file recieves just before execution (last meal ;) ) ...use some CF'ing either in both ends, or just this one:

http://www.briandunning.com/cf/603

My point here is to narrow down the the scope, no apparent need for neither globals nor $$'s.... to globalize variables too much, isn't a virtue to boast about.

But as such shouldn't you forget to investigate both this download as well as studying the entire thread surrounding it:

http://www.fmforums.com/forum/showpost.php?post/187787/

--sd

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.