"The records have fields from 2 tables (Sales Orders & Quotes). All the fields from "Sales Orders" get duplicated (exc. "Date" that gets updated as it should) but none of the fields from "Quotes" do."
The problem here is thst a record can only have fields from ONE table. You appear to be duplicating a Sales order record and not a quote record. The duplicated record probably does not have the same match field values. They may have a different serial number or UUID. Thus it does not link to a quote record like the first does.
Thanks for your reply.
I have been trying all day to create a duplicate of "Quotes" database (trying to keep only fields from 1 database) and keeping the old one as "OLDQuotes" so I can start fresh but no luck, not enough knowledge, so I gave up.
Feel free to ask for help here while providing more specifics.
Duplicate Record duplicates the current record of the current layout's found set. The table from which that record comes is determined by the table occurrence specified in show records from in layout set up. A "Table Occurrence" is what we call a box on the relationship graph found in Manage Database.
So to duplicate a quotes record, you need to use a layout based on an occurrence of Quotes.
Thanks for offering.
I am taking the liberty of sending a link to Dropbox where a working copy of the files reside.
If this is not allowed please let me know and I will delete the files.
Hope that helps visualize my problem and maybe I can get some specific hints how to fix this or not.
Please describe exactly what you are trying to accomplish by this record duplication. Without that info, we might suggest a fix that works for us but. Or for you.
In "Quotes" I have many records that hold information I can reuse since many jobs are the same.
I want to look for a particular record (Find) and then "Duplicate" and change the "Job Location" as a reference.
The rest many times remains the same (sizes may change), but the bulk of the information is already entered.
I was always able to do that in "Proposals", and it saves me from reentering information.
Hope this is clear enough. Thanks!
1 of 1 people found this helpful
You appear to be trying to duplicate a record and all its relate child records (also called line-item records), but change the Job location.
Several threads here (and elsewhere):
"Duplicate a Parent Record and All Child Records"
"Duplicating Bill Of Materials (duplicating portal line items)"
Like I said at the beginning I am a novice and not very good at FM (what I did was many years ago) and at 67 you tend to forget.
If looking at my case someone could direct me to the best (and easiest) way so I can try to fix it, it would be greatly appreciated.
I am good at working from examples, but do not know where to start.
1 of 1 people found this helpful
I once made a video where you have a button that duplicated the current record and also the related records.
You could give that a look.
I think is way over my head. But I will give it my best try!
I was right way too complicated for me and I do not have the proper fields. I realized how poorly organized my table "Quotes" is (too late now-living with it). I am linking 3 screenshots here: Dropbox - FM Screenshots
Anyhow I did some of the things you talk about like making a new layout "LineItem", and while doing that I realized that I do not need any of the fields from "Sales Orders" ("Contact Name", "Company", "Job Location" and even "Notes" from table "Quotes" can remain empty) and when I duplicate the record it works...except like it shows on 1 of the screenshots "Quote ID" is not assigned properly (not surprisingly since is not tied to "Sales Orders")
I also included a button like you suggested "Duplicate quotes" and this are my thoughts how I want this to work.
1- Found the record I want to duplicate (only fields from "LineItem" layout)
2- Hit the button "Duplicate Quotes" and start the script "Duplicate Quotes".
In the script:
Go to Layout ["LineItem"(Quotes)]
I know is not much, so far so good except I get: error with "Quote ID"
I think the answer would be "get last "Quote ID" from "Sales Orders" + 1" or something like it.
But how to enter it on a blank record in the Main Form ("Form View" layout)
I am stuck, a little help and I will get there somehow.
ADDED: more to the script on another screenshot (same result, but it was not going to the same record, now fixed)
You might need the "phone-a-friend" option.
Check the FMI site and see if you can find a developer near you. Many work as "tutors", helping you learn to fix your own database. Or post your location (or if you can use remote access/screenshare) for more assistance, if this is beyond the forum's help.
Thanks Beverly for your suggestion.
But I have no friends with your caliber of knowledge.
For the record I was not asking for someone to write me a database, I was stuck on the "Quote ID" dilemma, very simple it was at the end.
Anyway I figured it out, (ain't pretty but works like a charm!)
Mainly thanks to GuyStevens - you are awesome!
If anyone (non-technically superior) like me runs into this thread and can use
a very simple solution to this issue of duplicating records (involving more than 1 table) contact me
and I will be more than glad to help.