Ask a Question related to FileMaker, Design and Development.
-
B Collins #1
Re: newbie question: creating a new record in a related file
somaBoyMX wrote:>
> Hello all,
>
> I've got one file named contacts.fp5, which contains people info and another
> named invoices.fp5, containg, well... invoices.
>
> The invoices file has a field "invoice_custid" (unique), which I
> successfully related to field "contact_id" (unique) in my contacts file.
> When I enter the invoice_custid, it automatically fetches the related data
> (name, address, etc) from the contacts file
>
> I want to be able to add a button to my contacts file which instantly
> creates a new record in the invoices file related to the current contact
> record.
>
> I guess I need some kind of button script to do this, but I'm new to FMP,
> coming from MySQL (which has a completely different interface).
>
> All help is much appreciated.
>
> .soma
You can do it with a Portal in the Contacts file. First, the
relationship from the Contacts file as Master to the related Invoice
file has to be defined to allow creation of related records. See File>>
Define relationships in the Contacnts file to do this. Then put a portal
from the Invoices file into a layout of the Contacts file. Put suitable
fields from the Invoices file into the portal, such as date, amount, etc.
Now when you go to the portal, click in the first empty row, and enter
data. That will create a new related Invoice record, related to the
contact. Done. No need for a script.
Bill
B Collins Guest
-
Creating directories... : Newbie Question
Hey all I have this is a script: <?php $city = $_GET; $state = $_GET; if($file_name !="") { -
Creating Function Newbie question
Hi I have written a small bit of code for my web site that basically is anti hack code. $checking = ($HTTP_GET_VARS); if (ereg ("+",... -
Newbie question: how can decide if there is any records in record set
hi, I am new to asp. I need to check if the query returns any records, how to do it?. I run the sql in Query Analyzer it returns nothing. but... -
Runtime CD query (not the simle read-only file question, but related)
I'm a newbie, publishing my first DB on CD for a client. The DB is large (several hundred Meg), so the client feels the main DB should stay (as... -
Go to related record creates new record?
In a portal I have a button that with Go to related record attached (it also sets some globals in the related file, and goes to a layout in there... -
somaBoyMX #2
Re: newbie question: creating a new record in a related file
Thanks for the help Bill, very useful. But I think I wasn't specific enough.> You can do it with a Portal in the Contacts file. First, the
> relationship from the Contacts file as Master to the related Invoice
> file has to be defined to allow creation of related records. See File>>
> Define relationships in the Contacnts file to do this. Then put a portal
> from the Invoices file into a layout of the Contacts file. Put suitable
> fields from the Invoices file into the portal, such as date, amount, etc.
>
> Now when you go to the portal, click in the first empty row, and enter
> data. That will create a new related Invoice record, related to the
> contact. Done. No need for a script.
>
> Bill
I need users to be able to:
* click somewhere in the contacts file (perhaps a button that says: <<make
new invoice for customer>>)
* the invoice file should automatically open, showing a new record tied to
the contacts record
* the user then can fill out this invoice and print it immediately in the
layout specified in the invoice file
I know your way will work, but then the user would need to open the invoice
file, search for the record and print it.
Any hints?
somaBoyMX Guest
-
Matt Revenaugh #3
Re: newbie question: creating a new record in a related file
On 7/30/03 5:31 AM, in article
3f27bb47$0$273$ba620e4c@reader0.news.skynet.be, "somaBoyMX"
<nosuch@fakemail.net> wrote:
Use a hidden layout with the invoice portal on it. Make sure that the>>>> You can do it with a Portal in the Contacts file. First, the
>> relationship from the Contacts file as Master to the related Invoice
>> file has to be defined to allow creation of related records. See File>>
>> Define relationships in the Contacnts file to do this. Then put a portal
>> from the Invoices file into a layout of the Contacts file. Put suitable
>> fields from the Invoices file into the portal, such as date, amount, etc.
>>
>> Now when you go to the portal, click in the first empty row, and enter
>> data. That will create a new related Invoice record, related to the
>> contact. Done. No need for a script.
>>
>> Bill
> Thanks for the help Bill, very useful. But I think I wasn't specific enough.
> I need users to be able to:
> * click somewhere in the contacts file (perhaps a button that says: <<make
> new invoice for customer>>)
> * the invoice file should automatically open, showing a new record tied to
> the contacts record
> * the user then can fill out this invoice and print it immediately in the
> layout specified in the invoice file
>
> I know your way will work, but then the user would need to open the invoice
> file, search for the record and print it.
>
> Any hints?
>
>
>
invoice::customer_id is in the portal.
Now create a "create invoice" button on the customer screen.
The script should look something like this...
Go to layout "myHiddenLayout"
Go to field (invoice::customer_id)
Go to portal row (last row)
Set field (invoice::customer_id = customer_id)
Go to related record (invoice)
There are some hastles doing it this way though. Like making sure that the
correct layout is there for the user. You may need to add an extra step
like...
Perform script (external invoice::myLayoutSwitch)
Matt Revenaugh
Matt Revenaugh Guest
-
Matt Revenaugh #4
Re: newbie question: creating a new record in a related file
On 7/30/03 8:26 AM, in article [email]ypq2he54nihy.fsf@sdf.lonestar.org[/email], "Lou
Lesko" <lou@NOSPAMlouislesko.com> wrote:
>
> No offense to Matt but there is a much better way to handle your needs.
>
No offense taken, I just was not sure of the abilities of SomaBoy. A global
field works well too, if you have your ducks lined up. A newbie may be
confused easily.
The problem with your solution is that in the step
SetField[invoice_custid, relationship_to_customer_db::global_cust_id]
there is no relationship_to_customer_db yet!
So, do you need to create a secondary customer relationship to get to the
globals? Or will FileMaker retrieve global_cust_id without a valid
relationship to CUSTOMER?
Matt Revenaugh
Matt Revenaugh Guest
-
somaBoyMX #5
Re: newbie question: creating a new record in a related file
> Good point! I thought he had a relation set up already so that he could
I have. Anyway, thanks for both you guys efforts, with your advise I'm sure> display the customer info on the invoice?
I can handle it from here.
As to my "abilities": this is my first fmPro db, and although I know my fair
share of SQL and relational database theory, it doesn't seem to do much good
on this one. Why did they have to go and call tables "files" and rows
"records"? Why do you have to build "scripts" instead of regular queries and
table joins? Is it supposed to be "user friendly"? Well to me it sure isn't.
I don't think I'll be dabbling with this freak of an rdbms again...
thanks, again,
..soma
somaBoyMX Guest
-
Glenn Schwandt #6
Re: newbie question: creating a new record in a related file
"somaBoyMX" <nosuch@fakemail.net> wrote in message
news:3f280c71$0$284$ba620e4c@reader0.news.skynet.b e...sure>> > Good point! I thought he had a relation set up already so that he could
> > display the customer info on the invoice?
> I have. Anyway, thanks for both you guys efforts, with your advise I'mfair> I can handle it from here.
> As to my "abilities": this is my first fmPro db, and although I know mygood> share of SQL and relational database theory, it doesn't seem to do muchand> on this one. Why did they have to go and call tables "files" and rows
> "records"? Why do you have to build "scripts" instead of regular queriesisn't.> table joins? Is it supposed to be "user friendly"? Well to me it sureNot unsual. It is "user friendly" for people who know little or nothing>
about database design...and for people who are willing (or able) to "forget"
how [insert your favorite rdbms name here] works when they are using
FileMaker.
Your loss. It's always good to have as many tools in your belt as possible.> I don't think I'll be dabbling with this freak of an rdbms again...
>
> thanks, again,
>
>
> .soma
>
>
Glenn Schwandt Guest
-
Lou Lesko #7
Re: newbie question: creating a new record in a related file
"somaBoyMX" <nosuch@fakemail.net> writes:
>
> I don't think I'll be dabbling with this freak of an rdbms again...
>
> thanks, again,
Oh whatever!
loulou
Lou Lesko Guest
-
JC #8
Re: newbie question: creating a new record in a related file
Maybe the solution will more easy if you make a script that copy the ID
CLIENT (client database) , then perform an external script in the INVOICE
database that makes a new record and then paste the ID CLIENT in the ID
CLIENT field (invoice database).
Also the solution made by Bill is also a solution but the only thing you
have to do is to put a little button (right side p.e.) in the portal with
the script "go to related record".
regards and sorry for my english.
Juan
"somaBoyMX" <nosuch@fakemail.net> escribió en el mensaje
news:3f27bb47$0$273$ba620e4c@reader0.news.skynet.b e...etc.>> > You can do it with a Portal in the Contacts file. First, the
> > relationship from the Contacts file as Master to the related Invoice
> > file has to be defined to allow creation of related records. See File>>
> > Define relationships in the Contacnts file to do this. Then put a portal
> > from the Invoices file into a layout of the Contacts file. Put suitable
> > fields from the Invoices file into the portal, such as date, amount,enough.>> >
> > Now when you go to the portal, click in the first empty row, and enter
> > data. That will create a new related Invoice record, related to the
> > contact. Done. No need for a script.
> >
> > Bill
> Thanks for the help Bill, very useful. But I think I wasn't specificinvoice> I need users to be able to:
> * click somewhere in the contacts file (perhaps a button that says: <<make
> new invoice for customer>>)
> * the invoice file should automatically open, showing a new record tied to
> the contacts record
> * the user then can fill out this invoice and print it immediately in the
> layout specified in the invoice file
>
> I know your way will work, but then the user would need to open the> file, search for the record and print it.
>
> Any hints?
>
>
>
JC Guest



Reply With Quote

