Portal / detail Window

Portal / detail Window

am 23.01.2008 13:03:57 von John Devlon

Hi,

I've created a filemaker file, using 2 tables. Each table has a form.
I've created a table "Shop" and "Products". Shop has fields "ID" and "date".
Products has fields "ID", "Name", "Shop_ID"

On the first form I've created a portal using the data of the second table.

Everything works fine.

However, I would like to be able to click on the record in the portal,
viewing the detailed record in the second form.

I also would like to create button, going to the second form, which creates
a a new record, to be filled out, automatically entering the ID of the shop.

Does anyone know how ?

John

Re: Portal / detail Window

am 23.01.2008 14:02:14 von bill

In article ,
"john Devlon" wrote:

> Hi,
>
> I've created a filemaker file, using 2 tables. Each table has a form.
> I've created a table "Shop" and "Products". Shop has fields "ID" and "date".
> Products has fields "ID", "Name", "Shop_ID"
>
> On the first form I've created a portal using the data of the second table.
>
> Everything works fine.
>
> However, I would like to be able to click on the record in the portal,
> viewing the detailed record in the second form.
>
> I also would like to create button, going to the second form, which creates
> a a new record, to be filled out, automatically entering the ID of the shop.
>
> Does anyone know how ?
>
> John

Put a pushbutton in the portal row and define it "Go to related record"
and specify the layout to use when it does that.

As to creating a new related record using a pushbutton, you write a
script to create the new record and assign the shop ID, then assign that
script to the pushbutton. The button would be on the Shop layout. The
script would need to store the value of ShopID, go to the Produc layout,
create a new record, then assign the value of ShopID to the Shop_ID
field in the new Produc record.

Details depend on which version of Filemaker you are using, which you do
not say. In FileMaker 9 you can use a script parameter to assign the
value of ShopID, and can also do this in 8, if I recall correctly. Or,
you could use a script variable. In 7 and earlier you would need to use
a global field to store and assign the value of ShopID.

FileMaker 9: script as follows:
Go to layout [Shop]
Enter Browse mode
Go to layout [product]
New record
Set field [shopID; Get(Script Parameter)]

Define the button on the Shop layout to run the script, with script
parameter = ShopID


I think this will also work in FileMaker 8.

In 7 and earlier, you will need to use a global field to store the value
of ShopID. Then the script would look something like this:

Go to layout [Shop]
Enter Browse mode
Set Field [gNumber, ShopID]
Go to layout [product]
New record
Set field [shopID, gNumber]

--
Bill Collins
For email, change "fake" to "earthlink"

Re: Portal / detail Window

am 24.01.2008 22:10:20 von John Devlon

Thanx Bill, It was a big help...
What would the world be without you ?

John


"Bill" schreef in bericht
news:bbcollins-15C748.08021323012008@70-3-168-216.area5.spcs dns.net...
> In article ,
> "john Devlon" wrote:
>
>> Hi,
>>
>> I've created a filemaker file, using 2 tables. Each table has a form.
>> I've created a table "Shop" and "Products". Shop has fields "ID" and
>> "date".
>> Products has fields "ID", "Name", "Shop_ID"
>>
>> On the first form I've created a portal using the data of the second
>> table.
>>
>> Everything works fine.
>>
>> However, I would like to be able to click on the record in the portal,
>> viewing the detailed record in the second form.
>>
>> I also would like to create button, going to the second form, which
>> creates
>> a a new record, to be filled out, automatically entering the ID of the
>> shop.
>>
>> Does anyone know how ?
>>
>> John
>
> Put a pushbutton in the portal row and define it "Go to related record"
> and specify the layout to use when it does that.
>
> As to creating a new related record using a pushbutton, you write a
> script to create the new record and assign the shop ID, then assign that
> script to the pushbutton. The button would be on the Shop layout. The
> script would need to store the value of ShopID, go to the Produc layout,
> create a new record, then assign the value of ShopID to the Shop_ID
> field in the new Produc record.
>
> Details depend on which version of Filemaker you are using, which you do
> not say. In FileMaker 9 you can use a script parameter to assign the
> value of ShopID, and can also do this in 8, if I recall correctly. Or,
> you could use a script variable. In 7 and earlier you would need to use
> a global field to store and assign the value of ShopID.
>
> FileMaker 9: script as follows:
> Go to layout [Shop]
> Enter Browse mode
> Go to layout [product]
> New record
> Set field [shopID; Get(Script Parameter)]
>
> Define the button on the Shop layout to run the script, with script
> parameter = ShopID
>
>
> I think this will also work in FileMaker 8.
>
> In 7 and earlier, you will need to use a global field to store the value
> of ShopID. Then the script would look something like this:
>
> Go to layout [Shop]
> Enter Browse mode
> Set Field [gNumber, ShopID]
> Go to layout [product]
> New record
> Set field [shopID, gNumber]
>
> --
> Bill Collins
> For email, change "fake" to "earthlink"