March 22, 200520 yr 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?
March 22, 200520 yr are you using more then one table? i am not sure if i am understanding your question correctly.
March 23, 200520 yr Author 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.
March 23, 200520 yr 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
March 23, 200520 yr Author 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)
March 23, 200520 yr 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...
Create an account or sign in to comment