dbTalk Databases Forums  

[HLP] New to FM:

comp.databases.filemaker comp.databases.filemaker


Discuss [HLP] New to FM: in the comp.databases.filemaker forum.



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

Default [HLP] New to FM: - 09-27-2005 , 02:54 AM






Hi,
I'm evaluating FM,version 5 as I'm on MacOS9. (seems I cant run a higher
version of FM, right?).
I'm more used toAccess but I do like the spirit of FM, though I haven't got
enough into it tofind my in complex cases.

Help on the following would be appreciated:

I have 4 files:
1) clients (name,clientID etc..)
2) workers (name, workerID etc..)
Clients prepay services in the form of a sheet of 12 tickets, so there's a
file
3) ticketSheet
(sheetID,ClientID,firstTicketNumber,LastTicketNumb er,pricePaid, dateIssued
etc..)
Workers get a ticket from a client for each hour's work, and come back to me
to get their salary
4) ticket (ticketNumber,workerID,clientID)

When a worker gives me his ticket(s) I know the workerID and the
ticketNumber. NowI want to link the ticket to client via the ticketSheet
file. I' like to have a button on the workers file to 1) create the ticket
record and 2) link it to the clientID. Got no clue how to write scripts that
work on several files. Of course I could do without the ticketSheet file and
create 12 tickets from the outcome, but what I bill is a sheet, so that file
makes sense.

Hints / references / examples welcome
---
Fjordur



Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-27-2005 , 04:39 AM






Fjordur wrote on (9/27/2005):

Quote:
Hi,
I'm evaluating FM,version 5 as I'm on MacOS9. (seems I cant run a higher
version of FM, right?).
You can run FM6.

Quote:
I'm more used toAccess but I do like the spirit of FM, though I haven't got
enough into it tofind my in complex cases.

Help on the following would be appreciated:

I have 4 files:
1) clients (name,clientID etc..)
2) workers (name, workerID etc..)
Clients prepay services in the form of a sheet of 12 tickets, so there's a
file
3) ticketSheet
(sheetID,ClientID,firstTicketNumber,LastTicketNumb er,pricePaid, dateIssued
etc..)
Workers get a ticket from a client for each hour's work, and come back to
me
to get their salary
4) ticket (ticketNumber,workerID,clientID)
The real key is having a unique ID in each file, through which various
files can be related.

Relationships between files are named and individually evaluated: each
field that is common between two files can link those files. CLientID, for
example, links Client to Ticket. WorkerID links Worker to Ticket.

Scripting between files is a simple matter of using the Perform Script
script step, in which you select "External Script", identifying the other
file and which script to run. The destination script has to be there,
first, though.

Quote:
When a worker gives me his ticket(s) I know the workerID and the
ticketNumber. NowI want to link the ticket to client via the ticketSheet
file. I' like to have a button on the workers file to 1) create the ticket
record and 2) link it to the clientID. Got no clue how to write scripts
that
work on several files. Of course I could do without the ticketSheet file
and
create 12 tickets from the outcome, but what I bill is a sheet, so that
file
makes sense.

Hints / references / examples welcome
---
Fjordur
I don't see why you would need to have TicketSheet file separate from
Tickets. You should be able to have all of the necessary fields and
layouts in a single file. Just create a separate labels type layout and
print from there.

Matt


Reply With Quote
  #3  
Old   
Fjordur
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-27-2005 , 05:22 AM



"Matt Wills" <I'm (AT) Witz (DOT) end> wrote

Quote:
Fjordur wrote on (9/27/2005):
I'm evaluating FM,version 5 as I'm on MacOS9. (seems I cant run a higher
version of FM, right?).
You can run FM6.
Aha! I'll go check the FM site.

Quote:
I have 4 files:
1) clients (name,clientID etc..)
2) workers (name, workerID etc..)
Clients prepay services in the form of a sheet of 12 tickets, so there's
a
file
3) ticketSheet
(sheetID,ClientID,firstTicketNumber,LastTicketNumb er,pricePaid,
dateIssued
etc..)
Workers get a ticket from a client for each hour's work, and come back to
me
to get their salary
4) ticket (ticketNumber,workerID,clientID)

The real key is having a unique ID in each file, through which various
files can be related.
Relationships between files are named and individually evaluated: each
field that is common between two files can link those files.
I know that, done that.
CLientID, for example, links Client to Ticket.
Not in the schema above: clientID links clients to ticketSheets, as clients
buy (and get billed for) ticket sheets
Quote:
WorkerID links Worker to Ticket.
Yes; but this link is established later, and from this link I want to
establish the link ticket-client via ticketSheet

Quote:
Scripting between files is a simple matter of using the Perform Script
script step, in which you select "External Script", identifying the other
file and which script to run. The destination script has to be there,
first, though.
OK,I tried that but could'nt find how to pass parameters from one script to
the other. Say I have a button on the worker layout, the script needs to 1)
create an attached ticket, the number of which I'll input manually, that's
easy, 2) find a record in the ticketSheet file where firstTicketNumber<= new
ticket number and LastTicketNumber>=new ticket number , get the clientID
from this ticketSheet and store it into the single ticket's clientID field.
What I dunno is how to do the latter.
Quote:
When a worker gives me his ticket(s) I know the workerID and the
ticketNumber. NowI want to link the ticket to client via the ticketSheet
file. I' like to have a button on the workers file to 1) create the
ticket
record and 2) link it to the clientID. Got no clue how to write scripts
that work on several files. Of course I could do without the ticketSheet
file and create 12 tickets from the outcome, but what I bill is a sheet,
so that file makes sense.

I don't see why you would need to have TicketSheet file separate from
Tickets. You should be able to have all of the necessary fields and
layouts in a single file.
I don't get your idea,here; d'you mean a single file for both ticketSheets
and tickets?
--
Fjordur




Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-27-2005 , 06:30 AM



Fjordur wrote on (9/27/2005):

Quote:
"Matt Wills" <I'm (AT) Witz (DOT) end> wrote in message
news:br8_e.15148$lP3.9974 (AT) trndny08 (DOT) ..
Fjordur wrote on (9/27/2005):
I'm evaluating FM,version 5 as I'm on MacOS9. (seems I cant run a higher
version of FM, right?).
You can run FM6.
Aha! I'll go check the FM site.
You won't find anything. They won't sell it to you any more.

Check eBay.


Quote:
Scripting between files is a simple matter of using the Perform Script
script step, in which you select "External Script", identifying the other
file and which script to run. The destination script has to be there,
first, though.
OK,I tried that but could'nt find how to pass parameters from one script to
the other.
Passing parameters doesn't happen natively until FM7.

The workaround: Create global fields as necessary to receive your
parameters using the Set Field script step. With relationships existing
between files, you can have a script in one file set a g.Field value in a
different file. You can do that in either direction (from or to the active
file).

BTW, using Set Field to populate a global does not require you actually
switch to a layout containing that feld.


Quote:
I don't see why you would need to have TicketSheet file separate from
Tickets. You should be able to have all of the necessary fields and
layouts in a single file.
I don't get your idea,here; d'you mean a single file for both ticketSheets
and tickets?
Exactly.

Unless I'm missing your concept, all you need is a Tickets file, with a
labels layout (a sheet) to print a range of numbered tickets.

You could find just find the range of tickets you want to print, go to the
labels layout, and do it.

Matt


Reply With Quote
  #5  
Old   
Fjordur
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-27-2005 , 06:51 AM



"Matt Wills" <I'm (AT) Witz (DOT) end> wrote

Quote:
Passing parameters doesn't happen natively until FM7.
The workaround: Create global fields as necessary to receive your
parameters using the Set Field script step. With relationships existing
between files, you can have a script in one file set a g.Field value in a
different file. You can do that in either direction (from or to the active
file).
Okaaaaayyyyyyy! That's kinda odd, though...

Quote:
I don't see why you would need to have TicketSheet file separate from
Tickets. You should be able to have all of the necessary fields and
layouts in a single file.
I don't get your idea,here; d'you mean a single file for both
ticketSheets
and tickets?
Exactly.
Unless I'm missing your concept, all you need is a Tickets file, with a
labels layout (a sheet) to print a range of numbered tickets.
You could find just find the range of tickets you want to print, go to the
labels layout, and do it.
OK, think I get the idea, gotta think about it. Fodd for thought.

Thanks a lot, Matt
--
Fjordur




Reply With Quote
  #6  
Old   
Matt Wills
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-27-2005 , 07:00 AM



Fjordur wrote on (9/27/2005):

Quote:
"Matt Wills" <I'm (AT) Witz (DOT) end> wrote in message
news:53a_e.11242$L15.2580 (AT) trndny01 (DOT) ..
Passing parameters doesn't happen natively until FM7.
The workaround: Create global fields as necessary to receive your
parameters using the Set Field script step. With relationships existing
between files, you can have a script in one file set a g.Field value in a
different file. You can do that in either direction (from or to the active
file).
Okaaaaayyyyyyy! That's kinda odd, though...
Well, yeah, but it's what we had to work with before 7 gave us Optional
Script Parameters, and 8 gave us Script Variables.

Matt


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

Default Re: [HLP] New to FM: - 09-27-2005 , 04:04 PM



In article <53a_e.11242$L15.2580@trndny01>, "Matt Wills" <I'm (AT) Witz (DOT) end>
wrote:

Quote:
Fjordur wrote on (9/27/2005):

"Matt Wills" <I'm (AT) Witz (DOT) end> wrote in message
news:br8_e.15148$lP3.9974 (AT) trndny08 (DOT) ..
Fjordur wrote on (9/27/2005):
I'm evaluating FM,version 5 as I'm on MacOS9. (seems I cant run a higher
version of FM, right?).
You can run FM6.
Aha! I'll go check the FM site.

You won't find anything. They won't sell it to you any more.

Check eBay.
I was about to say they do, but after checking the FileMaker website I
see they've now removed the webpage telling you about getting FileMaker
6 licence codes. It's now only FileMaker 7 or the new version 8. (

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


Reply With Quote
  #8  
Old   
Matt Wills
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-27-2005 , 04:31 PM



Helpful Harry wrote on (9/27/2005):

Quote:
In article <53a_e.11242$L15.2580@trndny01>, "Matt Wills" <I'm (AT) Witz (DOT) end
wrote:

Fjordur wrote on (9/27/2005):

"Matt Wills" <I'm (AT) Witz (DOT) end> wrote in message
news:br8_e.15148$lP3.9974 (AT) trndny08 (DOT) ..
Fjordur wrote on (9/27/2005):
I'm evaluating FM,version 5 as I'm on MacOS9. (seems I cant run a
higher
version of FM, right?).
You can run FM6.
Aha! I'll go check the FM site.

You won't find anything. They won't sell it to you any more.

Check eBay.

I was about to say they do, but after checking the FileMaker website I
see they've now removed the webpage telling you about getting FileMaker
6 licence codes. It's now only FileMaker 7 or the new version 8. (

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
Seems to me someone else mentioned being able to buy additional seats and
found that it is still possible, but this is regarding buying an upgrade
or new full of 6.

Matt

--



Reply With Quote
  #9  
Old   
Fjordur
 
Posts: n/a

Default Re: [HLP] New to FM: - 09-28-2005 , 02:23 AM



"Matt Wills" <I'm (AT) Witz (DOT) end> wrote

Quote:
Scripting between files is a simple matter of using the Perform Script
script step, in which you select "External Script", identifying the
other
file and which script to run. The destination script has to be there,
first, though.
OK,I tried that but could'nt find how to pass parameters from one script
to
the other.

Passing parameters doesn't happen natively until FM7.

The workaround: Create global fields as necessary to receive your
parameters using the Set Field script step. With relationships existing
between files, you can have a script in one file set a g.Field value in a
different file. You can do that in either direction (from or to the active
file).
I tried that,and of course it works fine,thanks.

One question: I designed a script to create tickets from a ticketSheet
(these are 2 different files, thus 2 different scripts as you suggested).
The ticket script needs to know the ticketSheetID,of course (1 to many
relationship). Which of the following is best practice:
1) the master script in ticketSheet puts the ticketSheetID into a global
currentTicketSheetID field in ticketSheet before it calls the script in file
ticket; then the script in ticket goes get the global of file ticketSheet
or
2) the script in ticketSheet puts the ticketSheetID into a global
currentTicketSheetID field in ticket before it calls the script in file
ticket; then the script in ticket gets the global of file ticket
In one word: put the global(s) in master file or in slave file? I can't see
any reason to choose one or the other.
--
Fjordur




Reply With Quote
  #10  
Old   
FP
 
Posts: n/a

Default Re: New to FM: - 09-28-2005 , 03:01 AM



Quote:
One question: I designed a script to create tickets from a ticketSheet
(these are 2 different files, thus 2 different scripts as you suggested).
The ticket script needs to know the ticketSheetID,of course (1 to many
relationship). Which of the following is best practice:
1) the master script in ticketSheet puts the ticketSheetID into a global
currentTicketSheetID field in ticketSheet before it calls the script in file
ticket; then the script in ticket goes get the global of file ticketSheet
or
2) the script in ticketSheet puts the ticketSheetID into a global
currentTicketSheetID field in ticket before it calls the script in file
ticket; then the script in ticket gets the global of file ticket
In one word: put the global(s) in master file or in slave file? I can't see
any reason to choose one or the other.
There is no right or wrong way to do this, what ever works for you is
good. A standard way of doing things is to have a file called Main or
MainMenu which contains 1 record only where preferences are stored.
Usually all files link to this file using a relationship of 2 calc
fields that both equal 1 eg.
Main has a calc number field with calculation 1
Ticket has a calc number field with calculation 1
create a relationship from Ticket to Main using the above mentioned
fields.

Usually some temp global fields are created in the Main file eg.
Text1_g, Text2_g, Num1_g...

Since your scripts are only transferring data from 1 file to another
you could set a global in the Main file from 1 script and read it from
the second script, this way you can reuse the globals and don't end up
cluttering up your files with globals.
The only issue here you should be aware of is that if the found count
in the Ticket file is 0 and your trying to read related data from the
Main file through the above mentioned relationship, you won't get any
results because the relationship is not valid until you have some
records.



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.