K3lso Posted March 22, 2005 Posted March 22, 2005 how can I create a script that, when I click a button, it automatically stores (copy and paste) some records into a new layout?? I have a layout with contact names and address. When they pay their debit notes I would enter a date that they made the payment with the check number. Finally I want to click on the "REGISTER" (that will perform the script) button so it stores all info "names, adress, date and check number" into a new layout named "REGISTERED DATA". So I wont have to enter again the name, adress, into the "REGISTERED DATA" layout. Any help?
jhomer Posted March 22, 2005 Posted March 22, 2005 are you using more then one table? i am not sure if i am understanding your question correctly.
K3lso Posted March 23, 2005 Author Posted March 23, 2005 Yes. Im using two tables. I want to send all the info from one to the other automatically. This way i wont have to enter two times the records.
Ano Nimus Posted March 23, 2005 Posted March 23, 2005 Make the fields in the 'Registred Data' layout lookup fields, that look up the desired data from the contacts layout. On a general principle using copy&paste is not a good idea and using the relational capabilities of FMP is
K3lso Posted March 23, 2005 Author Posted March 23, 2005 It wont work as desired. i dont want all data to be stored in the other layout, just a few and when i want (when i click on the desired button)
jhomer Posted March 23, 2005 Posted March 23, 2005 two possible ideas one would be to use a table to store all information about the customer and assign them a unique contact code.. add a field in the payment table also called contact code... relate the two tables based on the contact caode... you can pull inforamtion about the customer based on this realtionship and also track each payment as a new record. or when i transfer data i use a third table called variables or globals... this table will contain field names to correspond with the field names in the contacts table. make each of these a global variables which can be done in define data base: options : storage area write a script that will SET each desired field in VARIABLES to the corresponding field in CONTACTS... then you would goto which ever layout you desire... create a new record.. then SET each field in REGISTERED equal to the corresponding field in VARIABLES... attach this scripts to a button and you should be good to go...
Recommended Posts
This topic is 7188 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now