You'll need to explain in greater detail. An example would be good.
You can give each tab in a tab control an object name using the Name box on the position tab of the inspector.
If you name a tab "Tab One" in this way, the script step Go To Object [ "Tab One" ] will select that tab on the current record and layout.
What's not clear to me is what's meant by "perform a query there, picking up..."
Thanks. I will try that out.
An example for the query is this:
On Tab 1 the use sees packet id as a field. And there is this button.
On pressing the button and having the script ( Go to Object (Tab 2)) will take me to tab2 (which shows the contents of a package based on the package id. When reaching there I want the value of packet id to be passed to Tab2 so that the contents can be shown.
How have you set up your tables and relationships?
If just one package is shown on tab one, you could possibly design things so that clicking the tab for tab 2 automatically shows you a tab with the package details.
Does tab 1 list many "packages" or just one? Are they listed in a portal or with individual fields for each listed package?
In TAB 1, I have a Master and Detail. Master is 'Contact' and Detail (in a portal layout) lists the 'Packages Received 'by a Contact, date, occasion etc. TAB 1 in the detail (portal) section shows the package id and package name. It does not list the content of the package which are in another table (Package Content).
The Package and Package Content are two tables in a master -detail relationship and they are in another tab page 2. So I am looking at placing a button nect to each portal record on page 1. On clicking the button the user should be taken to page 2 and a query/ find be performed there automatically, on the package and it's content (Package Content) passing the package id from Page 1 as a paramter.
Thanks for all your help.
Is this what you have for tables and relationships?
with Contact as the table ( table occurrence actually ) listed in "show records from" in Layout Setup...?
Then a portal on tab 1 lists Package records?
And on Tab 2 you want to see the related Package contents record?
This can be done, but I need confirmation on the details first.
Do you have many Package Contents records for one Package Record?
If so, try this:
Put a portal to Package Contents on Tab 2.
Define a portal filter expression that looks like this.
$$PackageID = PackageContents::PackageID //the field you use to match Package content records to a given package.
Write a script:
Set Variable [$$PackageID ; Value: Package::PackageID ]
Refresh Window [Flush Cached Join Results ]
Go To Object ["//put object name of Tab 2 here"]
Make sure you modify the above expressions to user your table and field names.