dbTalk Databases Forums  

Relationship, scripting data copy

comp.databases.filemaker comp.databases.filemaker


Discuss Relationship, scripting data copy in the comp.databases.filemaker forum.



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

Default Relationship, scripting data copy - 01-24-2012 , 12:36 AM






Prelim
As many know, in a business one has Quotes and Orders. Quotes might
become Orders but not necessarily. Quotes have many of the same data
fields as Orders, however, creating Quotes on the Orders Table is
problematic. Depending how much quoting you do you might find your
Order database over populated by quotes, dead or otherwise. When you
use an auto-entered serial or numbering system then you end up with
many redundant Order/Quote numbers.

Consequently I am trying to configure my database such that I can move
Quote data from a Quote Table to an Order Table at that point when a
Quote becomes an Order.

My thought, through a button on Quote Form, is:

Open New Window
Create New Record: ORDER, layout Order Form
Set Field - target (ORDERS field name), calc (QUOTE field name).

.... and Set Field for all the field data to transfer.

It does not work.

I am not sure whether the New Record is referencing the current QUOTE
record.

My relationship tables look something like this:

CONTACTS_kp_ContactID - ORDERS_kf_ContactID
ORDERS_kp_OrderID - LINES_kf_OrdersID
PRODUCT_kp_ProductID - LINES_kf_ProductID

CONTACTS_kp_ContactID - QUOTE_kf_ContactID
QUOTE_kp_QuoteID - LINES_QUOTE_kf_QuoteID
PRODUCT_kp_ProductID - LINES_QUOTE_kf_ProductID

Since there is a common denominator in both - CONTACT_kp_ContactID, is
this possible?



Thanks
Matthew

Reply With Quote
  #2  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Relationship, scripting data copy - 01-24-2012 , 01:15 AM






Matthew Buck <matthew (AT) reflectingdesign (DOT) com> wrote:

Quote:
Consequently I am trying to configure my database such that I can move
Quote data from a Quote Table to an Order Table at that point when a
Quote becomes an Order.
I did the same 5 years ago with FMP 8.

Quote:
My thought, through a button on Quote Form, is:

Open New Window
Create New Record: ORDER, layout Order Form
Set Field - target (ORDERS field name), calc (QUOTE field name).

... and Set Field for all the field data to transfer.

It does not work.
I haven't tried to understand all those relations you made, just give
you my simple approach:

From the quote: GTRR to the quot line items, if any
Leave them as they are and go to the order layout
Create new order record
grab the key in a variable or global field
go to the layout with order line items
import the quote lines (see 2)
use replace field contents to assign the foreign key for the order
go back to the order layout

--
http://clk.ch

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.