On 15 Dec 2008, at 15:28, Ron wrote:
My 3 level relationship now works, but…
If I use a button on my first portal to go to the tab control which
holds the portals for various roles, when I enter a new role the
data I entered stays there when I go to another person.
Since the relationship in the Role portals is to the global field,
the global field doesn’t change until I click my button again!
I do dig myself some deep holes…
Thanks!
Ron Carr
Yep. That's the way it goes. If you start doing this kind of stuff,
you've gotta think of everything.
So, one way to deal with it is to take control of navigation. If you
script record-to-record navigation and new record creation and...
etc. etc., then you can control that global in the scripts.
Or maybe you can do something like this. You set two globals with
your button. One is what you have now (lets call it the
g_temp_relation_id) and the other is set with the id of the current
record (lets call it g_record_id). Then, you use a calculated field
with an if or case statement: if g_record_id is the same as the id of
the current record, then the result is g_temp_relation_id, otherwise
it is empty. Now base your relationship on this calculated field.
I haven't tried this, but I guess something like it should work.
Steve