![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||||
| |||||
|
|
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. |
|
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 |
|
WorkerID links Worker to Ticket. Yes; but this link is established later, and from this link I want to |
|
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 |
|
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 |
#4
| |||
| |||
|
|
"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. |
|
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. |
|
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? |
#5
| |||
| |||
|
|
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... |
|
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. |
#6
| |||
| |||
|
|
"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... |
#7
| |||
| |||
|
|
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. |
(
#8
| |||
| |||
|
|
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) |
#9
| |||
| |||
|
|
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). |
#10
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |