![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
On Mon, 23 Jan 2012 22:54:50 -0800 (PST), Buckbuck wrote: * 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. I'd keep both together, just separated by a checkbox whether it's a quote or an order. Thus all you have to do is to duplicate a record and make it an order by changing the checkbox. *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. Obviously it doesn't. You do have a relation from the quote id to the order id? Then copy the quote id to the order id first. Then you may walk through your fields and do a set field (from quote-id field). - Martin |
#3
| |||
| |||
|
|
On Tue, 24 Jan 2012 07:10:28 -0800 (PST), Buckbuck wrote: Obviously it doesn't. You do have a relation from the quote id to the order id? Then copy the quote id to the order id first. Then you may walk through your fields and do a set field (from quote-id field). - Martin *What relation? Through CONTACTS? Are you suggesting *QUOTE_kp Quote ID = ORDER_kf_OrderID ? Eactly - that's the way to copy anything from the quote table to to order table. If you do want to copy from the contacts table, you may use the contacts relations. - Martin |
#4
| |||
| |||
|
|
On Wed, 25 Jan 2012 14:23:18 -0800 (PST), Buckbuck wrote: *So far so good. One part of the undertaking I am having difficulty *with concerns the Lines portal. When I Set Field, Lines_Order, Sku; *Lines Proforma, Sku , only the first record is copied. I kind of *understand why but do not understand a work around. Can you give *advise me? Set Field does work on the current record only - which would be your first, usually. Choices: - use "Replace Field Contents" which does work on all active (found) * records - use a loop construct * *goto first record * *loop * * *set field * * *goto next record (exit on last) * *end loop Martin |
#5
| |||
| |||
|
|
On Wed, 25 Jan 2012 14:50:08 -0800 (PST), Buckbuck wrote: *When you say 'go to first record' how do I indicate to the script *where the first record starts, ie; it is the first record on the lines *portal on Proforma, PF12-00001? My script button is on my Order form *(ORDER). do you talk filemaker script or do you talk about something very different? The first record is the first one in a found set of records, in all records when no subset is selected, after a sort or the first unsorted. |
![]() |
| Thread Tools | |
| Display Modes | |
| |