dbTalk Databases Forums  

Basic new record question

comp.databases.filemaker comp.databases.filemaker


Discuss Basic new record question in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
justin
 
Posts: n/a

Default Basic new record question - 11-20-2005 , 10:52 PM






I'm setting up a small database for my wife's gradening business using
Filemaker 6.0 on the Mac.

I have the following tables (files) built:

Master - contains client contact data
Jobs - contains summaries for all jobs (linked to the master table by
"client ID" number)
Line Item Labour - contains individual tasks associated with a job
(linked to Jobs by "invoice ID")
Line Item Materials - contains individual material items associated
with a job (linked to Jobs by "invoice ID")

I have a layout on the Master file which displays contact info for an
individual client and a summary of their invoices. The invoices are
displayed in a portal linked to the Jobs file.

I want to be able to do two different things from this layout on the
Master file:

1. Jump to a layout called "invoice" on the Jobs file and limit the
records to only those associated with the client (matching client ID)
currently displayed on the main layout on the Master file.

2. Create a new record on the Jobs file that is associated with the
client (matching client ID) currently displayed on the main layout on
the Master file.

I have wrestled and wrestled with the script writer but just can't get
my head around it.

Any suggestions or tips would be greatly appreciated.

Thanks,

J.


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Basic new record question - 11-20-2005 , 11:21 PM






In article <1132548722.619759.302560 (AT) g14g2000cwa (DOT) googlegroups.com>,
"justin" <justin (AT) citygigs (DOT) com> wrote:

Quote:
I'm setting up a small database for my wife's gradening business using
Filemaker 6.0 on the Mac.

I have the following tables (files) built:

Master - contains client contact data
Jobs - contains summaries for all jobs (linked to the master table by
"client ID" number)
Line Item Labour - contains individual tasks associated with a job
(linked to Jobs by "invoice ID")
Line Item Materials - contains individual material items associated
with a job (linked to Jobs by "invoice ID")

I have a layout on the Master file which displays contact info for an
individual client and a summary of their invoices. The invoices are
displayed in a portal linked to the Jobs file.

I want to be able to do two different things from this layout on the
Master file:

1. Jump to a layout called "invoice" on the Jobs file and limit the
records to only those associated with the client (matching client ID)
currently displayed on the main layout on the Master file.
Assuming there is more than one possible layout in the Jobs file, then
you'll need two scripts - one in the Master file and one in the Jobs
file. They should be something along the lines of:

GoToJobs (Master file script)
Go To Related Record [Show only related, JobsRelationship]
Perform Script [Sub-scripts, External(Jobs::GoToLayout)]


GoToLayout (Jobs file script)
Go To Layout ["Invoice"]


You may want to put something in the first script to check that there
are actually any related Jobs records, but judging by the next question
you probably don't need to.



Quote:
2. Create a new record on the Jobs file that is associated with the
client (matching client ID) currently displayed on the main layout on
the Master file.
This can be done via a portal and then FileMaker handles inserting the
correct data to link the records, but if you need to do it "manually"
you'll need to pass the current ClientID data to the Jobs file using a
new Global field in the Jobs file and again two scripts (one in the
Master file and one in the Jobs file). The scripts are something like:

NewJob (Master file script)
Set Field [JobsRelationship::g_CurrentClientID, ClientID]
Perform Script [Sub-scripts, External(Jobs::CreateJob)]


CreateJob (Jobs file script)
New Record / Request
Set Field [ClientID, g_CurrentClientID]


where g_CurrentClientID is a Global field of the appropriate type.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.